From 06d59c0151395e88125a1ae5466fbbaecdd1609c Mon Sep 17 00:00:00 2001 From: no author Date: Fri, 6 Feb 1998 21:00:33 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'V1_0_5_FREEZE4'. git-svn-id: svn://anonsvn.mit.edu/krb5/tags/V1_0_5_FREEZE4@10422 dc483132-0cff-0310-8789-dd5450dbe970 --- README | 277 ++++++-- doc/.cvsignore | 95 +-- doc/ChangeLog | 164 +++++ doc/Makefile | 8 +- doc/admin.texinfo | 815 +++++++++++++++++------ doc/build.texinfo | 146 ++-- doc/copyright.texinfo | 34 +- doc/definitions.texinfo | 4 +- doc/install.texinfo | 132 ++-- doc/krb425.texinfo | 38 +- doc/krb5-protocol/krb5.constants | 10 +- doc/send-pr.texinfo | 221 +++--- doc/user-guide.texinfo | 103 +-- src/ChangeLog | 20 + src/Makefile.in | 34 +- src/appl/bsd/ChangeLog | 78 +++ src/appl/bsd/forward.c | 20 +- src/appl/bsd/kcmd.c | 4 +- src/appl/bsd/krlogind.c | 9 +- src/appl/bsd/krshd.c | 30 +- src/appl/bsd/login.M | 2 +- src/appl/bsd/login.c | 23 +- src/appl/bsd/loginpaths.h | 10 + src/appl/bsd/v4rcp.c | 106 ++- src/appl/gss-sample/ChangeLog | 6 + src/appl/gss-sample/gss-client.c | 2 +- src/appl/gssftp/ftp/ChangeLog | 5 + src/appl/gssftp/ftp/ftp.c | 5 +- src/appl/gssftp/ftpd/ChangeLog | 14 + src/appl/gssftp/ftpd/ftpd.c | 6 +- src/appl/gssftp/ftpd/logwtmp.c | 2 +- src/appl/gssftp/ftpd/popen.c | 12 +- src/appl/popper/Imakefile | 93 --- src/appl/sample/sserver/ChangeLog | 7 + src/appl/sample/sserver/sserver.M | 13 +- src/appl/simple/client/ChangeLog | 5 + src/appl/simple/client/sim_client.c | 4 +- src/appl/simple/server/ChangeLog | 5 + src/appl/simple/server/sim_server.c | 2 +- src/appl/telnet/libtelnet/ChangeLog | 8 + src/appl/telnet/libtelnet/forward.c | 11 +- src/appl/telnet/libtelnet/kerberos5.c | 2 +- src/appl/telnet/telnet/ChangeLog | 22 + src/appl/telnet/telnet/commands.c | 26 +- src/appl/telnet/telnet/configure.in | 2 +- src/appl/telnet/telnetd/ChangeLog | 29 + src/appl/telnet/telnetd/ext.h | 2 +- src/appl/telnet/telnetd/state.c | 16 +- src/appl/telnet/telnetd/sys_term.c | 10 +- src/appl/telnet/telnetd/telnetd.c | 25 +- src/appl/user_user/ChangeLog | 5 + src/appl/user_user/client.c | 3 +- src/clients/kinit/ChangeLog | 4 + src/clients/kinit/kinit.M | 2 +- src/clients/klist/ChangeLog | 4 + src/clients/klist/klist.M | 2 +- src/clients/ksu/ChangeLog | 6 + src/clients/ksu/krb_auth_su.c | 12 +- src/config-files/ChangeLog | 5 + src/config-files/kdc.conf | 8 +- src/config/ChangeLog | 5 + src/config/post.in | 2 +- src/include/ChangeLog | 5 + src/include/k5-int.h | 6 +- src/include/kerberosIV/ChangeLog | 4 + src/include/kerberosIV/Makefile.in | 3 +- src/include/krb5/k5-config.h | 311 --------- src/kadmin.v4/server/ChangeLog | 6 + src/kadmin.v4/server/kadm_ser_wrap.c | 2 +- src/kadmin/cli/ChangeLog | 10 + src/kadmin/cli/kadmin.M | 17 +- src/kadmin/cli/kadmin.c | 2 +- src/kadmin/dbutil/ChangeLog | 5 + src/kadmin/dbutil/loadv4.c | 3 +- src/kadmin/passwd/ChangeLog | 20 + src/kadmin/passwd/configure.in | 22 +- src/kadmin/passwd/kpasswd.c | 2 +- src/kadmin/passwd/unit-test/Makefile.in | 6 +- src/kadmin/server/ChangeLog | 4 + src/kadmin/server/ovsec_kadmd.c | 10 +- src/kadmin/testing/scripts/ChangeLog | 4 + src/kadmin/testing/scripts/save_files.sh | 2 +- src/kadmin/testing/util/ChangeLog | 13 + src/kadmin/testing/util/tcl_kadm5.c | 1 - src/kadmin/testing/util/tcl_ovsec_kadm.c | 1 - src/kadmin/testing/util/test.c | 4 +- src/kadmin/v4server/ChangeLog | 6 + src/kadmin/v4server/kadm_ser_wrap.c | 2 +- src/kdc/ChangeLog | 72 ++ src/kdc/do_as_req.c | 2 + src/kdc/do_tgs_req.c | 7 +- src/kdc/kdc_preauth.c | 22 +- src/kdc/kdc_util.c | 47 +- src/kdc/kerberos_v4.c | 30 +- src/kdc/main.c | 4 +- src/krb524/ChangeLog | 11 + src/krb524/cnv_tkt_skey.c | 2 +- src/krb524/krb524d.c | 2 +- src/lib/ChangeLog | 12 + src/lib/Makefile.in | 20 +- src/lib/crypto/ChangeLog | 14 + src/lib/crypto/configure.in | 68 +- src/lib/crypto/cryptoconf.c | 15 +- src/lib/des425/ChangeLog | 4 + src/lib/des425/configure.in | 2 +- src/lib/gssapi/ChangeLog | 4 + src/lib/gssapi/configure.in | 2 +- src/lib/gssapi/generic/ChangeLog | 9 + src/lib/gssapi/generic/Makefile.in | 8 +- src/lib/gssapi/krb5/ChangeLog | 55 ++ src/lib/gssapi/krb5/accept_sec_context.c | 42 +- src/lib/gssapi/krb5/acquire_cred.c | 9 + src/lib/gssapi/krb5/delete_sec_context.c | 4 +- src/lib/gssapi/krb5/get_tkt_flags.c | 2 +- src/lib/gssapi/krb5/gssapiP_krb5.h | 3 +- src/lib/gssapi/krb5/init_sec_context.c | 79 ++- src/lib/gssapi/krb5/rel_cred.c | 8 +- src/lib/gssapi/krb5/ser_sctx.c | 4 +- src/lib/gssapi/krb5/wrap_size_limit.c | 10 +- src/lib/gssapi/mechglue/ChangeLog | 4 + src/lib/gssapi/mechglue/configure.in | 2 +- src/lib/kadm5/srv/ChangeLog | 17 + src/lib/kadm5/srv/server_acl.c | 3 +- src/lib/kadm5/srv/svr_principal.c | 11 +- src/lib/kadm5/unit-test/ChangeLog | 4 + src/lib/kadm5/unit-test/Makefile.in | 5 +- src/lib/kdb/ChangeLog | 10 + src/lib/kdb/configure.in | 2 +- src/lib/kdb/keytab.c | 37 +- src/lib/krb4/ChangeLog | 13 + src/lib/krb4/configure.in | 2 +- src/lib/krb4/g_krbhst.c | 4 +- src/lib/krb4/g_krbrlm.c | 6 +- src/lib/krb4/realmofhost.c | 18 +- src/lib/krb5/ChangeLog | 4 + src/lib/krb5/asn.1/ChangeLog | 5 + src/lib/krb5/asn.1/asn1buf.c | 4 + src/lib/krb5/configure.in | 2 +- src/lib/krb5/error_tables/ChangeLog | 4 + src/lib/krb5/error_tables/krb5_err.et | 1 + src/lib/krb5/keytab/file/ChangeLog | 5 + src/lib/krb5/keytab/file/ktf_g_ent.c | 14 +- src/lib/krb5/krb/ChangeLog | 44 ++ src/lib/krb5/krb/brand.c | 15 + src/lib/krb5/krb/fwd_tgt.c | 7 +- src/lib/krb5/krb/preauth.c | 38 +- src/lib/krb5/krb/recvauth.c | 13 +- src/lib/krb5/krb/send_tgs.c | 3 +- src/lib/krb5/krb/sendauth.c | 2 +- src/lib/krb5/os/ChangeLog | 11 + src/lib/krb5/os/locate_kdc.c | 3 +- src/lib/krb5/rcache/ChangeLog | 5 + src/lib/krb5/rcache/rc_io.c | 2 +- src/lib/{libkrb5.def => krb5_16.def} | 4 +- src/lib/rpc/ChangeLog | 20 + src/lib/rpc/clnt_generic.c | 2 +- src/lib/rpc/clnt_simple.c | 3 +- src/lib/rpc/configure.in | 6 +- src/lib/rpc/get_myaddress.c | 41 ++ src/lib/rpc/getrpcport.c | 2 +- src/lib/rpc/svc_auth_gssapi.c | 37 +- src/lib/rpc/types.hin | 4 +- src/lib/rpc/unit-test/ChangeLog | 4 + src/lib/rpc/unit-test/Makefile.in | 6 +- src/mac/ChangeLog | 8 + src/mac/Makefile.tmpl | 6 +- src/mac/SAP/GSSforSAP.r | 13 + src/mac/gss-sample/ChangeLog | 7 + src/mac/gss-sample/gss-client.c | 2 +- src/mac/libraries/ChangeLog | 6 + src/mac/libraries/KerberosHeaders.h | 6 +- src/mac/mkbindirs.sh | 13 + src/mac/version.r | 13 +- src/patchlevel.h | 3 +- src/slave/ChangeLog | 17 + src/slave/kprop.M | 8 +- src/slave/kprop.c | 2 +- src/slave/kpropd.M | 16 +- src/slave/kslave_update | 14 +- src/tests/dejagnu/ChangeLog | 4 + src/tests/dejagnu/Makefile.in | 5 +- src/tests/dejagnu/config/ChangeLog | 11 + src/tests/dejagnu/config/default.exp | 25 +- src/tests/misc/test_getsockname.c | 2 +- src/util/ChangeLog | 15 + src/util/db2/ChangeLog | 10 + src/util/db2/hash/dbm.c | 4 +- src/util/db2/hash/hash.c | 12 +- src/util/db2/hash/hash.h | 2 +- src/util/db2/obj/ChangeLog | 4 + src/util/db2/obj/Makefile.in | 4 - src/util/et/ChangeLog | 4 + src/util/et/configure.in | 2 +- src/util/makeshlib.sh | 7 +- src/util/mkrel | 121 +++- src/util/profile/ChangeLog | 10 + src/util/profile/prof_parse.c | 113 +++- src/util/pty/ChangeLog | 31 + src/util/pty/configure.in | 1 + src/util/pty/getpty.c | 62 +- src/util/pty/open_slave.c | 2 + src/util/pty/pty_err.et | 3 +- src/util/pty/update_utmp.c | 6 + src/util/pty/update_wtmp.c | 4 +- src/util/send-pr/Makefile.in | 28 +- src/util/send-pr/send-pr.sh | 26 +- src/windows/cns/ChangeLog | 8 + src/windows/cns/Makefile.in | 14 +- src/windows/cns/cns.c | 4 + src/windows/cns/{cns.def => krb5.def} | 4 +- src/windows/gss/ChangeLog | 8 +- src/windows/gss/gss-client.c | 2 +- src/windows/wintel/ChangeLog | 13 + src/windows/wintel/Makefile.in | 2 +- src/windows/wintel/screen.c | 17 +- 215 files changed, 3303 insertions(+), 1689 deletions(-) delete mode 100644 src/appl/popper/Imakefile delete mode 100644 src/include/krb5/k5-config.h create mode 100644 src/lib/krb5/krb/brand.c rename src/lib/{libkrb5.def => krb5_16.def} (95%) create mode 100644 src/mac/mkbindirs.sh rename src/windows/cns/{cns.def => krb5.def} (72%) diff --git a/README b/README index cc47bb5f0..43e70c938 100644 --- a/README +++ b/README @@ -1,51 +1,80 @@ -Beta test distribution READ-ME file. ------------------------------------ + Kerberos Version 5, Release 1.0 -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. + Release Notes -Files are copyright MIT, Cygnus Support, OpenVision, Oracle, Sun Soft, -and others. + The MIT Kerberos Team -The following copyright and permission notice applies to the -OpenVision Kerberos Administration system located in kadmin/create, -kadmin/dbutil, kadmin/server, lib/kadm, and portions of lib/rpc: +Unpacking the Source Distribution +--------------------------------- - Copyright, OpenVision Technologies, Inc., 1996, All Rights Reserved - - WARNING: Retrieving the OpenVision Kerberos Administration system - source code, as described below, indicates your acceptance of the - following terms. If you do not agree to the following terms, do not - retrieve the OpenVision Kerberos administration system. - - You may freely use and distribute the Source Code and Object Code - compiled from it, but this Source Code is provided to you "AS IS" - EXCLUSIVE OF ANY WARRANTY, INCLUDING, WITHOUT LIMITATION, ANY - WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR - ANY OTHER WARRANTY, WHETHER EXPRESS OR IMPLIED. IN NO EVENT WILL - OPENVISION HAVE ANY LIABILITY FOR ANY LOST PROFITS, LOSS OF DATA OR - COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY - SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS - AGREEMENT, INCLUDING, WITHOUT LIMITATION, THOSE RESULTING FROM THE USE - OF THE SOURCE CODE, OR THE FAILURE OF THE SOURCE CODE TO PERFORM, OR - FOR ANY OTHER REASON. - - OpenVision retains all rights, title, and interest in the donated - Source Code. With respect to OpenVision's copyrights in the donated - Source Code, OpenVision also retains rights to derivative works - of the Source Code whether created by OpenVision or a third party. - - OpenVision Technologies, Inc. has donated this Kerberos - Administration system to MIT for inclusion in the standard - Kerberos 5 distribution. This donation underscores our - commitment to continuing Kerberos technology development - and our gratitude for the valuable work which has been - performed by MIT and the Kerberos community. +The source distribution of Kerberos 5 comes in three gzipped tarfiles, +krb5-1.0.src.tar.gz, krb5-1.0.doc.tar.gz, and krb5-1.0.crypto.tar.gz. +The krb5-1.0.doc.tar.gz contains the doc/ directory and this README +file. The krb5-1.0.src.tar.gz contains the src/ directory and this +README file, except for the crypto library sources, which are in +krb5-1.0.crypto.tar.gz. + +Instruction on how to extract the entire distribution follow. These +directions assume that you want to extract into a directory called +DIST. + +If you have the GNU tar program and gzip installed, you can simply do: + + mkdir DIST + cd DIST + gtar zxpf krb5-1.0.src.tar.gz + gtar zxpf krb5-1.0.crypto.tar.gz + gtar zxpf krb5-1.0.doc.tar.gz +If you don't have GNU tar, you will need to get the FSF gzip +distribution and use gzcat: + mkdir DIST + cd DIST + gzcat krb5-1.0.src.tar.gz | tar xpf - + gzcat krb5-1.0.crypto.tar.gz | tar xpf - + gzcat krb5-1.0.doc.tar.gz | tar xpf - -Now, with that out of the way, let me point you to a few things: +Both of these methods will extract the sources into DIST/krb5-1.0/src +and the documentation into DIST/krb5-1.0/doc. + +Unpacking the Binary Distribution +--------------------------------- + +Binary distributions of Kerberos V5 are provided merely as convenience +to those people who wish to try out Kerberos V5 without needing to do +a full compile of Kerberos. + +MIT and the MIT Kerberos V5 development team make no guarantees that +we will continue to supply binary distributions for future releases of +Kerberos V5, or for any operating system/platform in particular. +These binary distributions have been prepared by members of the MIT +Kerberos V5 development team, or by volunteers who have graciously +agreed to test the pre-release snapshot. Each binary build is PGP +signed by the person who prepared the binary distribution for that +particular platform. + +While the binary distribution is *supposed* to correspond exactly to +the 1.0 Kerberos V5 source release, you have no way of knowing whether +the person who prepared the binary release might have inserted a +trojan horse, or a trapdoor. For all you know, the binary +distribution might be mailing all of your Kerberos keys to +kremvax!boris. (The same is true for the source distribution, but at +least you can audit the code yourself!) + +For this reason, if you are planning on using Kerberos V5 in +production, we strongly suggest that you obtain the source +distribution and compile it from source yourself. + +The binary distributions have been compiled so that they will install +in /usr/local. To install, su to root and and type the command: + + cd /usr/local + gunzip < /tmp/krb5-1.0..tar.gz | tar xvf - + + +Building and Installing Kerberos 5 +---------------------------------- The first file you should look at is doc/install.ps; it contains the notes for building and installing Kerberos 5. The info file @@ -58,32 +87,168 @@ which contain the system administrator's guide, and the user's guide, respectively. They are also available as info files kerberos-admin.info and krb5-user.info, respectively. ->> << ->> Please report any problems/bugs/comments to 'krb5-bugs@mit.edu' << ->> << +Reporting Bugs +-------------- + +Please report any problems/bugs/comments using the krb5-send-pr +program. The krb5-send-pr program will be installed in the sbin +directory once you have successfully compiled and installed Kerberos +V5 (or if you have installed one of our binary distributions). + +If you are not able to use krb5-send-pr because you haven't been able +compile and install Kerberos V5 on any platform, you may send mail to +krb5-bugs@mit.edu. + +Notes and Major Changes +----------------------- + +* We are now using the GNATS system to track bug reports for Kerberos +V5. It is therefore helpful for people to use the krb5-send-pr +program when reporting bugs. The old interface of sending mail to +krb5-bugs@mit.edu will still work; however, bug reports sent in this +fashion may experience a delay in being processed. + +* The default keytab name has changed from /etc/v5srvtab to +/etc/krb5.keytab. + +* login.krb5 no longer defaults to getting krb4 tickets. + +* The Windows (win16) DLL, LIBKRB5.DLL, has been renamed to +KRB5_16.DLL. This change was necessary to distinguish it from the +win32 version, which will be named KRB5_32.DLL. Note that the +GSSAPI.DLL file has not been renamed, because this name was specified +in a draft standard for the Windows 16 GSSAPI bindings. (The 32-bit +version of the GSSAPI DLL will be named GSSAPI32.DLL.) + +* The directory structure used for installations has changed. In +particular, files previously located in $prefix/lib/krb5kdc are now +normally located in $sysconfdir/krb5kdc. With the normal configure +options, this means the KDC database goes in /usr/local/var/krb5kdc by +default. If you wish to have the old behavior, then you would use a +configure line like the following: + + configure --prefix=/usr/local --sysconfdir=/usr/local/lib +* kshd has been modified to accept krb4 encrypted rcp connections; for +this to work, the v4rcp program must be in the bin directory. +* The gssrpc library has symbol collisions with the rpc library in +some of the libcs in certain operating systems without shared +libraries, notably some ports of NetBSD and MkLinux. For those +platforms which have rpc in libc and also contain NIS in libc, +compiling with static libraries will not work because of this +conflict. NetBSD users can either upgrade to the current tree, which +includes shared libraries for more ports, choose not to build kadmind +or kadmin, or recompile NetBSD without NIS support. MkLinux users +must either recompile without NIS or not build the administration +system. + +Copyright Notice and Legal Administrivia +---------------------------------------- + +Copyright (C) 1996 by the Massachusetts Institute of Technology. + +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 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. + +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. + +Individual source code files are copyright MIT, Cygnus Support, +OpenVision, Oracle, Sun Soft, and others. + +Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, +and Zephyr are trademarks of the Massachusetts Institute of Technology +(MIT). No commercial use of these trademarks may be made without +prior written permission of MIT. + +"Commercial use" means use of a name in a product or other for-profit +manner. It does NOT prevent a commercial firm from referring to the +MIT trademarks in order to convey information (although in doing so, +recognition of their trademark status should be given). + +The following copyright and permission notice applies to the +OpenVision Kerberos Administration system located in kadmin/create, +kadmin/dbutil, kadmin/passwd, kadmin/server, lib/kadm5, and portions +of lib/rpc: + + Copyright, OpenVision Technologies, Inc., 1996, All Rights Reserved + + WARNING: Retrieving the OpenVision Kerberos Administration system + source code, as described below, indicates your acceptance of the + following terms. If you do not agree to the following terms, do not + retrieve the OpenVision Kerberos administration system. + + You may freely use and distribute the Source Code and Object Code + compiled from it, with or without modification, but this Source + Code is provided to you "AS IS" EXCLUSIVE OF ANY WARRANTY, + INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY OR + FITNESS FOR A PARTICULAR PURPOSE, OR ANY OTHER WARRANTY, WHETHER + EXPRESS OR IMPLIED. IN NO EVENT WILL OPENVISION HAVE ANY LIABILITY + FOR ANY LOST PROFITS, LOSS OF DATA OR COSTS OF PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES, OR FOR ANY SPECIAL, INDIRECT, OR + CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, INCLUDING, + WITHOUT LIMITATION, THOSE RESULTING FROM THE USE OF THE SOURCE + CODE, OR THE FAILURE OF THE SOURCE CODE TO PERFORM, OR FOR ANY + OTHER REASON. + + OpenVision retains all copyrights in the donated Source Code. OpenVision + also retains copyright to derivative works of the Source Code, whether + created by OpenVision or by a third party. The OpenVision copyright + notice must be preserved if derivative works are made based on the + donated Source Code. + + OpenVision Technologies, Inc. has donated this Kerberos + Administration system to MIT for inclusion in the standard + Kerberos 5 distribution. This donation underscores our + commitment to continuing Kerberos technology development + and our gratitude for the valuable work which has been + performed by MIT and the Kerberos community. + +Acknowledgements +---------------- Appreciation Time!!!! There are far too many people to try to thank them all; many people have contributed to the development of Kerberos -V5. This is only a partial listing.... +V5. This is only a partial listing.... + +Thanks to Paul Vixie and the Internet Software Consortium for funding +the work of Barry Jaspan. This funding was invaluable for the OV +administration server integration, as well as the 1.0 release +preparation process. Thanks to John Linn, Scott Foote, and all of the folks at OpenVision Technologies, Inc., who donated their administration server for use in the MIT release of Kerberos. -Thanks to Paul Vixie and the Internet Software Consortium for -supporting the OV administration server integration work. - -Thanks to Jeff Bigler, Mark Eichin, Mark Horowitz, Nancy Gilman, Ken +Thanks to Jeff Bigler, Mark Eichin, Marc Horowitz, Nancy Gilman, Ken Raeburn, and all of the folks at Cygnus Support, who provided innumerable bug fixes and portability enhancements to the Kerberos V5 -tree. Thanks especially ot Jeff Bigler, for the new user and system +tree. Thanks especially to Jeff Bigler, for the new user and system administrator's documentation. Thanks to Doug Engert from ANL for providing many bug fixes, as well as testing to ensure DCE interoperability. +Thanks to Ken Hornstein at NRL for providing many bug fixes and +suggestions. + Thanks to Sean Mullan and Bill Sommerfeld from Hewlett Packard for their many suggestions and bug fixes. @@ -92,15 +257,3 @@ past and present: Jay Berkenbilt, Richard Basch, John Carr, Don Davis, Nancy Gilman, Sam Hartman, Marc Horowitz, Barry Jaspan, John Kohl, Cliff Neuman, Kevin Mitchell, Paul Park, Ezra Peisach, Chris Provenzano, Jon Rochlis, Jeff Schiller, Harry Tsai, Ted Ts'o, Tom Yu. - -Note: - -Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, and -Zephyr are trademarks of the Massachusetts Institute of Technology (MIT). No -commercial use of these trademarks may be made without prior written -permission of MIT. - -FYI, "commercial use" means use of a name in a product or other for-profit -manner. It does NOT prevent a commercial firm from referring to the MIT -trademarks in order to convey information (although in doing so, recognition -of their trademark status should be given). diff --git a/doc/.cvsignore b/doc/.cvsignore index b2c6b121c..47cc49736 100644 --- a/doc/.cvsignore +++ b/doc/.cvsignore @@ -1,80 +1,15 @@ -admin_toc.html -admin.html -admin_foot.html -admin.log -admin.dvi -admin.aux -admin.toc -admin.cp -admin.fn -admin.vr -admin.tp -admin.ky -admin.pg -admin-guide.ps -kerberos-admin.info -kerberos-admin.info-1 -kerberos-admin.info-2 -install_toc.html -install.html -install_foot.html -install.log -install.dvi -install.aux -install.toc -install.cp -install.fn -install.vr -install.tp -install.ky -install.pg -install-guide.ps -krb5-install.info -krb5-install.info-1 -krb5-install.info-2 -user-guide_toc.html -user-guide.html -user-guide_foot.html -user-guide.log -user-guide.dvi -user-guide.aux -user-guide.toc -user-guide.cp -user-guide.fn -user-guide.vr -user-guide.tp -user-guide.ky -user-guide.pg -user-guide.ps -krb5-user.info -kdestroy1.ps -klist1.ps -kinit1.ps -kinit2.ps -rcp1.ps -ftp1.ps -ftp2.ps -ftp3.ps -ftp4.ps -ftp5.ps -ftp6.ps -ftp7.ps -ftp8.ps -rlogin1.ps -ksu1.ps -ksu2.ps -ksu3.ps -ksu4.ps -ksu5.ps -rlogin2.ps -rsh1.ps -rsh2.ps -telnet1.ps -telnet2.ps -telnet3.ps -telnet4.ps -telnet5.ps -telnet6.ps -telnet7.ps -telnet8.ps -telnet9.ps +*.html +*.info +*.info-* +*.log +*.dvi +*.aux +*.toc +*.cp +*.fn +*.vf +*.tp +*.ky +*.pg +*.vr +*.ps diff --git a/doc/ChangeLog b/doc/ChangeLog index 7b3a8bbd2..49002f24f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,167 @@ +Fri Dec 13 15:10:44 1996 Tom Yu + + * admin.texinfo (The User--Kerberos Interaction): The environment + variable is KRB5CCNAME, not KRB5_CCNAME. + (Getting DNS Information Correct): It's Domain Name System, not + Distributed Name Service. + +Thu Dec 12 18:36:20 1996 Tom Yu + + * user-guide.texinfo: Bump edition to 1.0. Nuke gratuitous + vfills. Change @value{PRODUCT} to explicit reference, to avoid + makeinfo bug that introduces a nul character. + + * krb425.texinfo: Bump edition to 1.0. + + * build.texinfo (OS Incompatibilities): Refer to krb5-send-pr + instead of mail to krb5-bugs. + (Options to Configure): Change options to indicate meta-names, + e.g. "--prefix=PREFIX"; also nuke leading slash on some + descriptions of options. + + * admin.texinfo: Add more explicit linebreaks to prevent overruns; + also break up a few long lines in example program output. + +Fri Dec 6 13:58:19 1996 Tom Yu + + * .cvsignore: Ignore by suffix rather than by file. + + * Makefile (admin-guide-info): + (admin-guide-info): Update to reflect new info file name. + + * admin.texinfo: Change info file name to krb5-admin.info for + consistency. + (Administrating Kerberos Database Entries): "-c credentials_cache" + -> "-c ccache" to avoid overrun. + (Privileges): Null instance example is joeuser@REALM, not + joeuser/null@REALM. + + * install.texinfo (Kerberos Realms): SAN_FRANCISCO.FUBAR.ORG -> + HOUSTON.FUBAR.ORG to prevent margin overrun. + (Create a kadmind Keytab): Add explicit linebreak to prevent + margin overrun. + (Overview of This Guide): + (Installing Kerberos V5): Remove references to windows and mac + client machines for now. + + * krb425.texinfo: Use krb425.info instead of + Kerberos-V4-to-V5.info in the interest of shorter filenames. + + * user-guide.texinfo (Introduction): Eliminate "Kerberos V5 is + based on Kerberos V5". + (Ticket Management): Fix ref to "/rsh". + (rsh): Add explicit linebreak to avoid margin overrun. + + * krb425.texinfo (Upgrading KDCs): Use ROOTDIR rather than + INSTALLDIR to get the proper pathname. + + * send-pr.texinfo: Fix some misspellings, also remove references + to things that are only really applicable for Cygnus. + +Wed Dec 4 23:47:28 1996 Tom Yu + + * krb425.texinfo (Upgrading Application Servers): v5srvtab -> + krb5.keytab + +Mon Dec 2 13:00:26 1996 Barry Jaspan + + * build.texinfo (The DejaGnu Tests): info about .k5login for + krb-root tests [krb5-doc/261] + + * install.texinfo (Add Administrators to the Kerberos Database): + note relationship between acl file and admin principals + [krb5-doc/251] + (Edit the Configuration Files): mention the logging stanza here, + too, and tell people to check it when they start the daemons + [krb5-doc/253] + + * build.texinfo (The KADM5 Tests): add section for the kadm5 tests + [krb5-doc/247] + +Fri Nov 29 19:47:38 1996 Tom Yu + + * build.texinfo (Unpacking the Sources): Mention that ./krb5-1.0 + is the default directory that the tarballs will unpack into. + Also, "/u1/krb5" -> "/u1/krb5-1.0". + (osconf.h): Remove reference to DEFAULT_LNAME_FILENAME, as we're + no longer using the aname database code. + (Options to Configure): Add mention of --localstatedir + (Shared Library Support): It's Solaris 2.4/SunOS 5.4, not Solaris + 5.4. + (Solaris 2.X): Shared libs work with gcc. + + * install.texinfo (Mapping Hostnames onto Kerberos Realms): Fix + spacing error. + + * admin.texinfo: Fix up old references to "/krb5". + + * send-pr.texinfo: krb5-send-pr is in PREFIX/sbin, not PREFIX/bin. + + * admin.texinfo: "/lib/krb5kdc" -> "/var/krb5kdc" + + * krb425.texinfo (Upgrading Application Servers): Change flag + "cygnus" to "CYGNUS". + + * install.texinfo (Please Read the Documentation): Change flag + "cygnus" to "CYGNUS". + + * admin.texinfo (domain_realm): Change flag "cygnus" to "CYGNUS". + + * definitions.texinfo: Change /usr/@value{LCPRODUCT} to /usr/local + to sync with default paths. + + * admin.texinfo (domain_realm): Conditionalize "COM" vs "EDU" in + example. + + * install.texinfo (Create Host Keys for the Slave KDCs): Change + -randpass to -randkey. [244] + +Thu Nov 28 18:54:02 1996 Tom Yu + + * krb425.texinfo: Change to use "@chapternewpage odd", also frob + copyright page as per other docs. Also, remove footnote claiming + that "Kerberos V5 is based on the MIT beta7 release". + + * admin.texinfo (capaths): Fix unquoted braces. + (appdefaults): Fix unquoted braces. + +Wed Nov 27 18:27:18 1996 Jeffrey C. G. Bigler + + * Makefile: Added send-pr.texinfo to ADMIN_INCLUDES and + INSTALL_INCLUDES. + + * admin.texinfo: Added chapter on config files. Changed bug + reporting section to include send-pr file. + + * install.texinfo: Changed bug reporting section to include + send-pr file. Added reference to Sysadmin Guide chapter on config + files. + + * send-pr.texinfo: Fixed this up to match our version of + krb5-send-pr. + +Tue Nov 26 18:34:11 1996 Tom Yu + + * install.texinfo: Fix a couple of references to "@value{COMPANY}" + so they don't commit MIT to doing user support; also fixed some + punctuation errors. + +Mon Nov 25 23:39:53 1996 Theodore Y. Ts'o + + * copyright.texinfo: Change lib/kadm to lib/kadm5, and add the + kadmin/passwd to the list of directories containing OV + code. + +Sun Nov 24 23:55:52 1996 Ezra Peisach (epeisach@mit.edu) + + * build.texinfo: Remove --with-kdb-db section as it does not + exist. Add --with-tcl info. + +Tue Nov 19 13:42:00 1996 Barry Jaspan + + * install.texinfo, build.texinfo: misc suggestions from jhawk + [krb5-doc/55] + Fri Nov 15 17:52:39 1996 Jeff Bigler * Makefile (krb425-guide): added section to make krb425 guide. diff --git a/doc/Makefile b/doc/Makefile index 92a3477a9..f8c29969b 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -9,11 +9,11 @@ GZIP=gzip -9 MANPS=./man2ps ADMIN_INCLUDES=definitions.texinfo copyright.texinfo document-list.texinfo \ - glossary.texinfo + glossary.texinfo send-pr.texinfo ADMIN_DEPS=admin.texinfo $(ADMIN_INCLUDES) INSTALL_INCLUDES=definitions.texinfo copyright.texinfo document-list.texinfo \ - build.texinfo bug-report.texinfo + build.texinfo bug-report.texinfo send-pr.texinfo INSTALL_DEPS=install.texinfo $(INSTALL_INCLUDES) USER_GUIDE_INCLUDES=definitions.texinfo copyright.texinfo glossary.texinfo @@ -42,9 +42,9 @@ admin.html: $(ADMIN_DEPS) $(HTML) admin.texinfo .PHONY: admin-guide-info -admin-guide-info:: kerberos-admin.info +admin-guide-info:: krb5-admin.info -kerberos-admin.info: $(ADMIN_DEPS) +krb5-admin.info: $(ADMIN_DEPS) $(INFO) admin.texinfo .PHONY: install-guide-full diff --git a/doc/admin.texinfo b/doc/admin.texinfo index cca3e321e..7e70d28c7 100644 --- a/doc/admin.texinfo +++ b/doc/admin.texinfo @@ -3,7 +3,7 @@ \input texinfo @c -*-texinfo-*- @c %**start of header @c guide -@setfilename kerberos-admin.info +@setfilename krb5-admin.info @settitle Kerberos V5 System Administrator's Guide @setchapternewpage odd @c chapter begins on next odd page @c @setchapternewpage on @c chapter begins on next page @@ -15,7 +15,8 @@ @end iftex @include definitions.texinfo -@set EDITION b7-1 +@set EDITION 1.0 +@set UPDATED November 27, 1996 @finalout @c don't print black warning boxes @@ -58,6 +59,7 @@ installation. * Copyright:: * Introduction:: * How Kerberos Works:: +* Configuration Files:: * Administrating Kerberos Database Entries:: * Application Servers:: * Backups of Secure Hosts:: @@ -116,7 +118,7 @@ The appendices include sample configuration files, the list of Kerberos error messages, and a complete list of the time zones understood by @code{kadmin}. -@node How Kerberos Works, Administrating Kerberos Database Entries, Introduction, Top +@node How Kerberos Works, Configuration Files, Introduction, Top @chapter How Kerberos Works This section provides a simplified description of a general user's @@ -282,8 +284,8 @@ ticket-granting ticket and the key which allows you to use it, encrypted by your password. If @samp{kinit} can decrypt the Kerberos reply using the password you provide, it stores this ticket in a credentials cache on your local machine for later use. The name of the credentials cache -can be specified in the @samp{KRB5_CCNAME} environment variable. If -this variable is not set, the name of the file will be +can be specified in the @samp{KRB5CCNAME} environment variable. If this +variable is not set, the name of the file will be @file{/tmp/krb5cc_}, where is your UNIX user-id, represented in decimal format. @end enumerate @@ -329,7 +331,582 @@ Following are definitions of some of the Kerberos terminology. @include glossary.texinfo -@node Administrating Kerberos Database Entries, Application Servers, How Kerberos Works, Top +@node Configuration Files, Administrating Kerberos Database Entries, How Kerberos Works, Top +@chapter Configuration Files + +@menu +* krb5.conf:: +* kdc.conf:: +@end menu + +@node krb5.conf, kdc.conf, Configuration Files, Configuration Files +@section krb5.conf + +The @code{krb5.conf} file contains Kerberos configuration information, +including the locations of KDCs and admin servers for the Kerberos +realms of interest, defaults for the current realm and for Kerberos +applications, and mappings of hostnames onto Kerberos realms. Normally, +you should install your @code{krb5.conf} file in the directory +@code{/etc}. You can override the default location by setting the +environment variable @samp{KRB5_CONFIG}. + +The @code{krb5.conf} file is set up in the style of a Windows INI file. +Sections are headed by the section name, in square brackets. Each +section may contain zero or more relations, of the form: + +@smallexample +foo = bar +@end smallexample + +@noindent +or + +@smallexample +@group +fubar = @{ + foo = bar + baz = quux +@} +@end group +@end smallexample + +The @code{krb5.conf} file may contain any or all of the following seven +sections: + +@table @b +@itemx libdefaults +Contains default values used by the Kerberos V5 library. + +@itemx appdefaults +Contains default values used by Kerberos V5 applications. + +@itemx realms +Contains subsections keyed by Kerberos realm names. Each subsection +describes realm-specific information, including where to find the +Kerberos servers for that realm. + +@itemx domain_realm +Contains relations which map domain names and subdomains onto Kerberos +realm names. This is used by programs to determine what realm a host +should be in, given its fully qualified domain name. + +@itemx logging +Contains relations which determine how Kerberos programs are to perform +logging. + +@itemx capaths +Contains the authentication paths used with direct (nonhierarchical) +cross-realm authentication. Entries in this section are used by the +client to determine the intermediate realms which may be used in +cross-realm authentication. It is also used by the end-service when +checking the transited field for trusted intermediate realms. + +@itemx kdc +For a KDC, may contain the location of the kdc.conf file. +@end table + +@menu +* libdefaults:: +* appdefaults:: +* realms (krb5.conf):: +* domain_realm:: +* logging:: +* capaths:: +* Sample krb5.conf File:: +@end menu + +@node libdefaults, appdefaults, krb5.conf, krb5.conf +@subsection [libdefaults] + +The @code{libdefaults} section may contain any of the following +relations: + +@table @b +@itemx default_realm +Identifies the default Kerberos realm for the client. Set its value to +your Kerberos realm. + +@itemx default_tgs_enctypes +Identifies the supported list of session key encryption types that +should be returned by the KDC. The list may be delimited with commas or +whitespace. Currently, the only supported encryption type is +"des-cbc-crc". Support for other encryption types is planned in the +future. + +@itemx default_tkt_enctypes +Identifies the supported list of session key encryption +types that should be requested by the client. The format is the same as +for @emph{default_tkt_enctypes}. Again, the only supported encryption +type is "des-cbc-crc". + +@itemx clockskew +Sets the maximum allowable amount of clockskew in seconds that the +library will tolerate before assuming that a Kerberos message is +invalid. The default value is 300 seconds, or five minutes. + +@itemx checksum_type +Used for compatability with DCE security servers which do not support +the default CKSUMTYPE_RSA_MD5 used by this version of Kerberos. A value +of 1 indicates the default checksum type. Use a value of 2 to use the +CKSUMTYPE_RSA_MD4 instead. This applies to DCE 1.1 and earlier. + +@itemx ccache_type +Use this parameter on systems which are DCE clients, to specify the type +of cache to be created by kinit, or when forwarded tickets are received. +DCE and Kerberos can share the cache, but some versions of DCE do not +support the default cache as created by this version of Kerberos. Use a +value of 1 on DCE 1.0.3a systems, and a value of 2 on DCE 1.1 systems. +@end table + +@node appdefaults, realms (krb5.conf), libdefaults, krb5.conf +@subsection [appdefaults] + +Each tag in the [appdefaults] section names a Kerberos V5 application. +The value of the tag is a subsection with relations that define the +default behaviors for that application. + +For example: + +@smallexample +@group +[appdefaults] + kinit = @{ + forwardable = true + @} + telnet = @{ + forward = true + encrypt = true + autologin = true + @} +@end group +@end smallexample + +The list of specifiable options for each application may be found in +that application's man pages. The application defaults specified here +are overridden by those specified in the [realms] section. + +@node realms (krb5.conf), domain_realm, appdefaults, krb5.conf +@subsection [realms] + +Each tag in the [realms] section of the file is the name of a Kerberos +realm. The value of the tag is a subsection with relations that define +the properties of that particular realm. For each realm, the following +tags may be specified in the realm's subsection: + +@table @b +@itemx kdc +The name of a host running a KDC for that realm. An optional port +number (separated from the hostname by a colon) may be included. + +@itemx admin_server +Identifies the host where the administration server is running. +Typically, this is the master Kerberos server. + +@itemx application defaults +Application defaults that are specific to a particular realm may be +specified within that realm's tag. Realm-specific application defaults +override the global defaults specified in the [appdefaults] section. +@end table + +@node domain_realm, logging, realms (krb5.conf), krb5.conf +@subsection [domain_realm] + +The [domain_realm] section provides a translation from a domain name or +hostname to a Kerberos realm name. The tag name can be a host name, or +a domain name, where domain names are indicated by a prefix of a period +(@samp{.}). The value of the relation is the Kerberos realm name for +that particular host or domain. Host names and domain names should be +in lower case. + +If no translation entry applies, the host's realm is considered to be +the hostname's domain portion converted to upper case. For example, the +following [domain_realm] section: + +@smallexample +@group +[domain_realm] +@ifset MIT + .mit.edu = ATHENA.MIT.EDU +@end ifset + @value{PRIMARYDOMAIN} = @value{PRIMARYREALM} + crash.@value{PRIMARYDOMAIN} = TEST.@value{PRIMARYREALM} + @value{SECONDDOMAIN} = @value{SECONDREALM} +@end group +@end smallexample + +@noindent +maps crash.@value{PRIMARYDOMAIN} into the TEST.@value{PRIMARYREALM} +realm. All other hosts in the @value{PRIMARYDOMAIN} domain will map by +default to the @value{PRIMARYREALM} realm, and all hosts in the +@value{SECONDDOMAIN} domain will map by default into the +@value{SECONDREALM} realm. Note the entries for the hosts +@value{PRIMARYDOMAIN} and @value{SECONDDOMAIN}. Without these entries, +@ifset CYGNUS +these hosts would be mapped into the Kerberos realms @samp{COM} and +@end ifset +@ifclear CYGNUS +these hosts would be mapped into the Kerberos realms @samp{EDU} and +@end ifclear +@samp{ORG}, respectively. + +@node logging, capaths, domain_realm, krb5.conf +@subsection [logging] +The [logging] section indicates how a particular entity is to perform +its logging. The relations in this section assign one or more values to +the entity name. Currently, the following entities are used: + +@table @b +@itemx admin_server +These entries specify how the administrative server +is to perform its logging. + +@itemx default +These entries specify how to perform logging in the +absence of explicit specifications otherwise. +@end table + +Values are of the following forms: + +@table @b +@itemx FILE= + +@itemx FILE: +This value causes the entity's logging messages to go to the specified +file. If the @samp{=} form is used, the file is overwritten. If the +@samp{:} form is used, the file is appended to. + +@itemx STDERR +This value causes the entity's logging messages to go to its standard +error stream. + +@itemx CONSOLE +This value causes the entity's logging messages to go to the console, if +the system supports it. + +@itemx DEVICE= +This causes the entity's logging messages to go to the specified device. + +@itemx SYSLOG[:[:]] +This causes the entity's logging messages to go to the system log. + +The @dfn{severity} argument specifies the default severity of system log +messages. This may be any of the following severities supported by the +@code{syslog(3)} call, minus the LOG_ prefix: LOG_EMERG, LOG_ALERT, +LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, and LOG_DEBUG. +For example, a value of @samp{CRIT} would specify LOG_CRIT severity. + +The facility argument specifies the facility under which the messages +are logged. This may be any of the following facilities supported by +the syslog(3) call minus the LOG_ prefix: LOG_KERN, LOG_USER, LOG_MAIL, +LOG_DAEMON, LOG_AUTH, LOG_LPR, LOG_NEWS, LOG_UUCP, LOG_CRON, and +LOG_LOCAL0 through LOG_LOCAL7. + +If no severity is specified, the default is ERR. If no facility is +specified, the default is AUTH. +@end table + +In the following example, the logging messages from the KDC will go to +the console and to the system log under the facility LOG_DAEMON with +default severity of LOG_INFO; and the logging messages from the +administrative server will be appended to the file /var/adm/kadmin.log +and sent to the device /dev/tty04. + +@smallexample +@group +[logging] + kdc = CONSOLE + kdc = SYSLOG:INFO:DAEMON + admin_server = FILE:/var/adm/kadmin.log + admin_server = DEVICE=/dev/tty04 +@end group +@end smallexample + +@node capaths, Sample krb5.conf File, logging, krb5.conf +@subsection [capaths] + +In order to perform direct (non-hierarchical) cross-realm +authentication, a database is needed to construct the authentication +paths between the realms. This section defines that database. + +A client will use this section to find the authentication path between +its realm and the realm of the server. The server will use this section +to verify the authentication path used be the client, by checking the +transited field of the received ticket. + +There is a tag for each participating realm, and each tag has subtags +for each of the realms. The value of the subtags is an intermediate +realm which may participate in the cross-realm authentication. The +subtags may be repeated if there is more then one intermediate realm. A +value of "." means that the two realms share keys directly, and no +intermediate realms should be allowd to participate. + +There are n**2 possible entries in this table, but only those entries +which will be needed on the client or the server need to be present. +The client needs a tag for its local realm, with subtags for all the +realms of servers it will need to authenticate with. A server needs a +tag for each realm of the clients it will serve. + +For example, ANL.GOV, PNL.GOV, and NERSC.GOV all wish to use the ES.NET +realm as an intermediate realm. ANL has a sub realm of TEST.ANL.GOV +which will authenticate with NERSC.GOV but not PNL.GOV. The [capath] +section for ANL.GOV systems would look like this: + +@smallexample +@group +[capaths] + ANL.GOV = @{ + TEST.ANL.GOV = . + PNL.GOV = ES.NET + NERSC.GOV = ES.NET + ES.NET = . + @} + TEST.ANL.GOV = @{ + ANL.GOV = . + @} + PNL.GOV = @{ + ANL.GOV = ES.NET + @} + NERSC.GOV = @{ + ANL.GOV = ES.NET + @} + ES.NET = @{ + ANL.GOV = . + @} +@end group +@end smallexample + +The [capath] section of the configuration file used on NERSC.GOV systems +would look like this: + +@smallexample +@group +[capaths] + NERSC.GOV = @{ + ANL.GOV = ES.NET + TEST.ANL.GOV = ES.NET + TEST.ANL.GOV = ANL.GOV + PNL.GOV = ES.NET + ES.NET = . + @} + ANL.GOV = @{ + NERSC.GOV = ES.NET + @} + PNL.GOV = @{ + NERSC.GOV = ES.NET + @} + ES.NET = @{ + NERSC.GOV = . + @} + TEST.ANL.GOV = @{ + NERSC.GOV = ANL.GOV + NERSC.GOV = ES.NET + @} +@end group +@end smallexample + +In the above examples, the ordering is not important, except when the +same subtag name is used more then once. The client will use this to +determing the path. (It is not important to the server, since the +transited field is not sorted.) + +This feature is not currently supported by DCE. DCE security servers +can be used with Kerberized clients and servers, but versions prior to +DCE 1.1 did not fill in the transited field, and should be used with +caution. + +@node Sample krb5.conf File, , capaths, krb5.conf +@subsection Sample krb5.conf File + +Here is an example of a generic @code{krb5.conf} file: + +@smallexample +@group +[libdefaults] + ticket_lifetime = 600 + default_realm = @value{PRIMARYREALM} + default_tkt_enctypes = des-cbc-crc + default_tgs_enctypes = des-cbc-crc + +[realms] + @value{PRIMARYREALM} = @{ + kdc = @value{KDCSERVER}.@value{PRIMARYDOMAIN} + kdc = @value{KDCSLAVE1}.@value{PRIMARYDOMAIN} + kdc = @value{KDCSLAVE2}.@value{PRIMARYDOMAIN} + admin_server = @value{KDCSERVER}.@value{PRIMARYDOMAIN} + default_domain = @value{PRIMARYDOMAIN} + @} + @value{SECONDREALM} = @{ + kdc = @value{KDCSERVER}.@value{SECONDDOMAIN} + kdc = @value{KDCSLAVE1}.@value{SECONDDOMAIN} + admin_server = @value{KDCSERVER}.@value{SECONDDOMAIN} + @} + +[domain_realm] +@ifset MIT + .mit.edu = ATHENA.MIT.EDU +@end ifset + @value{PRIMARYDOMAIN} = @value{PRIMARYREALM} + +@end group +@end smallexample + +@iftex +@vfill +@end iftex + +@node kdc.conf, , krb5.conf, Configuration Files +@section kdc.conf + +The @code{kdc.conf} file contains KDC configuration information, +including defaults used when issuing Kerberos tickets. Normally, you +should install your @code{kdc.conf} file in the directory +@code{@value{ROOTDIR}/var/krb5kdc}. You can override the default +location by setting the environment variable @samp{KRB5_KDC_PROFILE}. + +The @code{kdc.conf} file is set up in the same format as the +@code{krb5.conf} file. (@xref{krb5.conf}.) The @code{kdc.conf} file +may contain any or all of the following three sections: + +@table @b +@itemx kdcdefaults +Contains default values for overall behavior of the KDC. + +@itemx realms +Contains subsections keyed by Kerberos realm names. Each subsection +describes realm-specific information, including where to find the +Kerberos servers for that realm. + +@itemx logging +Contains relations which determine how Kerberos programs are to perform +logging. +@end table + +@menu +* kdcdefaults:: +* realms (kdc.conf):: +* Sample kdc.conf File:: +@end menu + +@node kdcdefaults, realms (kdc.conf), kdc.conf, kdc.conf +@subsection [kdcdefaults] + +The following relation is defined in the [kdcdefaults] section: + +@table @b +@itemx kdc_ports +This relation lists the ports on which the Kerberos server should listen +by default. This list is a comma separated list of integers. If this +relation is not specified, the compiled-in default is usually port 88 +(the assigned Kerberos port) and port 750 (the port used by Kerberos +V4). +@end table + +@node realms (kdc.conf), Sample kdc.conf File, kdcdefaults, kdc.conf +@subsection [realms] + +Each tag in the [realms] section of the file names a Kerberos realm. +The value of the tag is a subsection where the relations in that +subsection define KDC parameters for that particular realm. + +For each realm, the following tags may be specified in the [realms] +subsection: + +@table @b +@itemx acl_file +(String.) Location of the access control list (acl) file that kadmin +uses to determine which principals are allowed which permissions on the +database. The default is @code{@value{ROOTDIR}/var/krb5kdc/kadm5.acl}. + +@itemx admin_keytab +(String.) Location of the keytab file that kadmin uses to authenticate +to the database. The default is +@code{@value{ROOTDIR}/var/krb5kdc/kadm5.keytab}. + +@itemx database_name +(String.) Location of the Kerberos database for this realm. The +default is @* @code{@value{ROOTDIR}/var/krb5kdc/principal}. + +@itemx default_principal_expiration +(Absolute time string.) Specifies the default expiration date of +principals created in this realm. + +@itemx default_principal_flags +(Flag string.) Specifies the default attributes of principals created +in this realm. + +@itemx dict_file +(String.) Location of the dictionary file containing strings that are +not allowed as passwords. The default is +@code{@value{ROOTDIR}/var/krb5kdc/kadm5.dict}. + +@itemx encryption_type +(Encryption type string.) Specifies the encryption type used for this +realm. Only "des-cbc-crc" is supported at this time. + +@itemx kadmind_port +(Port number.) Specifies the port that the kadmind daemon is to listen +for this realm. The assigned port for kadmind is 749. + +@itemx key_stash_file +(String.) Specifies the location where the master key has been stored +(via @code{kdb5_util stash}). The default is +@code{@value{ROOTDIR}/var/krb5kdc/.k5.@i{REALM}}, where @i{REALM} is the +Kerberos realm. + +@itemx kdc_ports +(String.) Specifies the list of ports that the KDC is to listen to for +this realm. By default, the value of kdc_ports as specified in the +[kdcdefaults] section is used. + +@itemx master_key_name +(String.) Specifies the name of the master key. + +@itemx master_key_type +(Key type string.) Specifies the master key's key type. Only +"des-cbc-crc" is supported at this time. + +@itemx max_life +(Delta time string.) Specifes the maximum time period for which a +ticket may be valid in this realm. + +@itemx max_renewable_life +(Delta time string.) Specifies the maximum time period during which a +valid ticket may be renewed in this realm. + +@itemx supported_enctypes +List of key:salt strings. Specifies the default key/salt combinations +of principals for this realm. Since only the encryption type +"des-cbc-crc" is supported, you should set this tag to +@samp{des-cbc-crc:normal}. +@end table + +@node Sample kdc.conf File, , realms (kdc.conf), kdc.conf +@subsection Sample kdc.conf File + +Here's an example of a @code{kdc.conf} file: + +@smallexample +@group +[kdcdefaults] + kdc_ports = 88 + +[realms] + @value{PRIMARYREALM} = @{ + kadmind_port = 749 + max_life = 10h 0m 0s + max_renewable_life = 7d 0h 0m 0s + master_key_type = des-cbc-crc + supported_enctypes = des-cbc-crc:normal + @} + +[logging] + kdc = FILE:@value{ROOTDIR}/var/krb5kdc/kdc.log + admin_server = FILE:@value{ROOTDIR}/var/krb5kdc/kadmin.log + +@end group +@end smallexample + +@node Administrating Kerberos Database Entries, Application Servers, Configuration Files, Top @chapter Administrating the Kerberos Database Your Kerberos database contains all of your realm's Kerberos principals, @@ -361,13 +938,13 @@ database dump and load, which are provided by @code{kdb5_util}). The remote version authenticates to the KADM5 server using the service principal @code{kadmin/admin}. If the credentials cache contains a -ticket for the @code{kadmin/admin} principal, and the @samp{-c -credentials_cache} option is specified, that ticket is used to -authenticate to KADM5. Otherwise, the @samp{-p} and @samp{-k} options -are used to specify the client Kerberos principal name used to -authenticate. Once kadmin has determined the principal name, it -requests a @code{kadmin/admin} Kerberos service ticket from the KDC, and -uses that service ticket to authenticate to KADM5. +ticket for the @code{kadmin/admin} principal, and the @samp{-c ccache} +option is specified, that ticket is used to authenticate to KADM5. +Otherwise, the @samp{-p} and @samp{-k} options are used to specify the +client Kerberos principal name used to authenticate. Once kadmin has +determined the principal name, it requests a @code{kadmin/admin} +Kerberos service ticket from the KDC, and uses that service ticket to +authenticate to KADM5. @menu * Kadmin Options:: @@ -514,7 +1091,7 @@ requires the ``inquire'' administrative privilege. The syntax is: @noindent The @code{get_principal} command has the alias @code{getprinc}. For example, suppose you wanted to view the attributes of the principals -@code{@value{RANDOMUSER1}/root@@@value{PRIMARYREALM}} and +@* @code{@value{RANDOMUSER1}/root@@@value{PRIMARYREALM}} and @code{systest@@@value{PRIMARYREALM}}. You would type: @smallexample @@ -629,7 +1206,7 @@ permissions are determined by the first matching entry. @smallexample @group */admin@@@value{PRIMARYREALM} * -@value{ADMINUSER}/null@@@value{PRIMARYREALM} ADMCIL +@value{ADMINUSER}@@@value{PRIMARYREALM} ADMCIL @value{ADMINUSER}/*@@@value{PRIMARYREALM} il @value{RANDOMUSER1}/root@@@value{PRIMARYREALM} cil */root@@@value{PRIMARYREALM} */*@@@value{PRIMARYREALM} i @@ -641,7 +1218,7 @@ has all administrative privileges. The user @code{@value{ADMINUSER}} has all permissions with his @code{admin} instance, @code{@value{ADMINUSER}/admin@@@value{PRIMARYREALM}} (matches the first line). He has no permissions at all with his @code{null} instance, -@code{@value{ADMINUSER}/null@@@value{PRIMARYREALM}} (matches the second +@code{@value{ADMINUSER}@@@value{PRIMARYREALM}} (matches the second line). He has @i{inquire} and @i{list} permissions with any other instance (matches the third line). When @code{@value{RANDOMUSER1}} is using her @code{root} @@ -649,7 +1226,7 @@ instance, @code{@value{RANDOMUSER1}/root@@@value{PRIMARYREALM}}, she has @i{change password}, @i{inquire}, and @i{list} privileges for any other principal that has the instance @code{root}. Finally, any principal in the realm @code{@value{PRIMARYREALM}} (except for -@code{@value{ADMINUSER}/null@@@value{PRIMARYREALM}}, as mentioned above) +@code{@value{ADMINUSER}@@@value{PRIMARYREALM}}, as mentioned above) has @i{inquire} privileges. @node Adding or Modifying Principals, Deleting Principals, Privileges, Principals @@ -741,14 +1318,14 @@ principal in the database. @item @{-|+@}allow_proxiable The ``-allow_proxiable'' option prohibits this principal from obtaining proxiable tickets. ``+allow_proxiable'' clears this flag. In effect, -``-allow_proxiable'' sets the KRB5_KDB_DISALLOW_PROXIABLE flag. on the -principal in the database. +``-allow_proxiable'' sets the @* KRB5_KDB_DISALLOW_PROXIABLE flag. on +the principal in the database. @item @{-|+@}allow_dup_skey The ``-allow_dup_skey'' option disables user-to-user authentication for this principal by prohibiting this principal from obtaining a session key for another user. ``+allow_dup_skey'' clears this flag. In effect, -``-allow_dup_skey'' sets the KRB5_KDB_DISALLOW_DUP_SKEY flag on the +``-allow_dup_skey'' sets the @* KRB5_KDB_DISALLOW_DUP_SKEY flag on the principal in the database. @item @{-|+@}requires_preauth @@ -767,8 +1344,8 @@ database. @item @{-|+@}allow_svr The ``-allow_svr'' flag prohibits the issuance of service tickets for this principal. ``+allow_svr'' clears this flag. In effect, -``-allow_svr'' sets the KRB5_KDB_DISALLOW_SVR flag on the principal in -the database. +``-allow_svr'' sets the @* KRB5_KDB_DISALLOW_SVR flag on the principal +in the database. @item @{-|+@}allow_tgs_req The ``-allow_tgs_req'' option specifies that a Ticket-Granting Service @@ -781,7 +1358,7 @@ principal in the database. @item @{-|+@}allow_tix The ``-allow_tix'' option forbids the issuance of any tickets for this principal. ``+allow_tix'' clears this flag. The default is -``+allow_tix''. In effect, ``-allow_tix'' sets the +``+allow_tix''. In effect, ``-allow_tix'' sets the @* KRB5_KDB_DISALLOW_ALL_TIX flag on the principal in the database. @item @{-|+@}needchange @@ -863,7 +1440,7 @@ kadmin:} If you will need cross-realm authentication, you need to add principals for the other realm's TGT to each realm. For example, if you need to do cross-realm authentication between the realms @value{PRIMARYREALM} and -@value{SECONDREALM}, you would need to add the principals +@value{SECONDREALM}, you would need to add the principals @* @samp{krbtgt/@value{SECONDREALM}@@@value{PRIMARYREALM}} and @samp{krbtgt/@value{PRIMARYREALM}@@@value{SECONDREALM}} to both databases. You need to be sure the passwords and the key version @@ -1312,8 +1889,9 @@ example: @smallexample @group @b{shell%} @value{ROOTDIR}/sbin/kdb5_util -r @value{PRIMARYREALM} create -s -@b{kdb5_util: No such file or directory while setting active database to '/krb5/principal' -Initializing database '@value{ROOTDIR}/lib/krb5kdc/principal' for +@b{kdb5_util: No such file or directory while setting active database to +@result{} '@value{ROOTDIR}/var/krb5kdc/principal' +Initializing database '@value{ROOTDIR}/var/krb5kdc/principal' for @result{} realm '@value{PRIMARYREALM}', master key name 'K/M@@@value{PRIMARYREALM}' You will be prompted for the database Master Password. @@ -1404,7 +1982,8 @@ for the kadmin @code{list_principals} (@pxref{Retrieving a List of Principals}) command. @end table -For example: +For example (The line beginning with @result{} is a continuation of the +previous line.): @smallexample @group @@ -1418,10 +1997,11 @@ kadmin:} @smallexample @group -@b{kadmin:} ktadd -k /krb5/kadmind.keytab kadmin/admin kadmin/changepw +@b{kadmin:} ktadd -k @value{ROOTDIR}/var/krb5kdc/kadmind.keytab +@result{} kadmin/admin kadmin/changepw @b{kadmin: Entry for principal kadmin/admin@@@value{PRIMARYREALM} with kvno 3, encryption type DES-CBC-CRC added to keytab - WRFILE:/krb5/kadmind.keytab. + WRFILE:@value{ROOTDIR}/var/krb5kdc/kadmind.keytab. kadmin:} @end group @end smallexample @@ -1466,9 +2046,9 @@ For example: @smallexample @group -@b{kadmin:} ktremove -k /krb5/kadmind.keytab kadmin/admin +@b{kadmin:} ktremove -k @value{ROOTDIR}/var/krb5kdc/kadmind.keytab kadmin/admin @b{kadmin: Entry for principal kadmin/admin with kvno 3 removed - from keytab WRFILE:/krb5/kadmind.keytab. + from keytab WRFILE:@value{ROOTDIR}/var/krb5kdc/kadmind.keytab. kadmin:} @end group @end smallexample @@ -1503,7 +2083,7 @@ to set up a cron job that adjusts the time on a regular basis. Several aspects of Kerberos rely on name service. In order for Kerberos to provide its high level of security, it is less forgiving of name service problems than some other parts of your network. It is important -that your Distributed Name Service (DNS) entries and your hosts have the +that your Domain Name System (DNS) entries and your hosts have the correct information. Each host's canonical name must be the fully-qualified host name @@ -1528,8 +2108,8 @@ Here is a sample @code{/etc/hosts} file: @end smallexample Additionally, on Solaris machines, you need to be sure the ``hosts'' -entry in the file @code{/etc/nsswitch.conf} includes the source ``dns'' -as well as ``file''. +entry in the file @* @code{/etc/nsswitch.conf} includes the source +``dns'' as well as ``file''. Finally, each host's keytab file must include a host/key pair for the host's canonical name. You can list the keys in a keytab file by @@ -1627,7 +2207,7 @@ suggests that you have rules that specifically name these applications and, if possible, list the allowed hosts. A reasonably good cookbook for configuring firewalls is available by FTP -from @code{ftp.livingston.com}, in the location: +from @* @code{ftp.livingston.com}, in the location: @code{/pub/firewall/firewall-1.1.ps.Z}. The book @cite{UNIX System Security}, by David Curry, is also a good starting point. @@ -1677,174 +2257,17 @@ Database from a Dump File}.) @node Bug Reporting, Appendix, Backups of Secure Hosts, Top @chapter Bug Reporting -In any complex software, there will be bugs. Please send bug reports or -other problems you may uncover to the e-mail address -@b{krb5-bugs@@mit.edu}. Please mention which version of the Kerberos V5 -distribution you are using, and whether you have made any private -changes. Bug reports that include proposed fixes are especially -welcome. If you do include fixes, please send them using either context -diffs or unified diffs (using @samp{diff -c} or @samp{diff -u}, -respectively). +@include send-pr.texinfo @node Appendix, , Bug Reporting, Top @appendix Appendix @menu -* Files:: -* krb5.conf:: -* kdc.conf:: * Errors:: * kadmin Time Zones:: @end menu -@node Files, krb5.conf, Appendix, Appendix -@appendixsec Files - -@node krb5.conf, kdc.conf, Files, Appendix -@appendixsec krb5.conf - -Normally, you should install your @code{krb5.conf} file in the directory -@code{/etc}. However, note that you can override this default through -the environment variable @samp{KRB5_CONFIG}. - -Here is an example of a generic @code{krb5.conf} file: - -@smallexample -@group -[libdefaults] - ticket_lifetime = 600 - default_realm = @value{PRIMARYREALM} - default_tkt_enctypes = des-cbc-crc - default_tgs_enctypes = des-cbc-crc - -[realms] - @value{PRIMARYREALM} = @{ - kdc = @value{KDCSERVER}.@value{PRIMARYDOMAIN}:88 - kdc = @value{KDCSLAVE1}.@value{PRIMARYDOMAIN}:88 - kdc = @value{KDCSLAVE2}.@value{PRIMARYDOMAIN}:88 - admin_server = @value{KDCSERVER}.@value{PRIMARYDOMAIN}:749 - default_domain = @value{PRIMARYDOMAIN} - @} - @} - -[domain_realm] - .@value{PRIMARYDOMAIN} = @value{PRIMARYREALM} - @value{PRIMARYDOMAIN} = @value{PRIMARYREALM} - -[logging] - kdc = FILE:/dev/ttyp9 - admin_server = FILE:/dev/ttyp9 - default = FILE:/dev/ttyp9 -@end group -@end smallexample - -@iftex -@vfill -@end iftex -@page - -Here is an example of a more extensive @code{krb5.conf} file, which -includes a second Kerberos realm and authentication to Kerberos V4 as -well as V5 KDCs in the realm @code{@value{PRIMARYREALM}}: - -@smallexample -@group -[libdefaults] - ticket_lifetime = 600 - default_realm = @value{PRIMARYREALM} - default_tkt_enctypes = des-cbc-crc - default_tgs_enctypes = des-cbc-crc - krb4_srvtab = /etc/srvtab - krb4_config = /usr/krb4/lib/krb.conf - krb4_realms = /usr/krb4/lib/krb.realms - -[realms] - @value{PRIMARYREALM} = @{ - kdc = @value{KDCSERVER}.@value{PRIMARYDOMAIN}:88 - kdc = @value{KDCSLAVE1}.@value{PRIMARYDOMAIN}:88 - kdc = @value{KDCSLAVE2}.@value{PRIMARYDOMAIN}:88 - admin_server = @value{KDCSERVER}.@value{PRIMARYDOMAIN}:749 - default_domain = @value{PRIMARYDOMAIN} - v4_instance_convert = @{ - bleep = @value{PRIMARYDOMAIN} - @} - @} - @value{SECONDREALM} = @{ - kdc = @value{KDCSERVER}.@value{SECONDDOMAIN} - kdc = @value{KDCSLAVE1}.@value{SECONDDOMAIN} - admin_server = @value{KDCSERVER}.@value{SECONDDOMAIN} - @} - -[domain_realm] - .@value{PRIMARYDOMAIN} = @value{PRIMARYREALM} - @value{PRIMARYDOMAIN} = @value{PRIMARYREALM} - .@value{SECONDDOMAIN} = @value{SECONDREALM} - @value{SECONDDOMAIN} = @value{SECONDREALM} -@end group -@end smallexample - -For the KDCs, add a section onto the end of the @code{krb5.conf} file -telling where the @code{kdc.conf} file is located, as in the following -example: - -@smallexample -@group -[kdc] - profile = @value{ROOTDIR}/lib/krb5kdc/kdc.conf - -[logging] - admin_server = FILE:@value{ROOTDIR}/lib/krb5kdc/kadmind.log - kdc = FILE:@value{ROOTDIR}/lib/krb5kdc/kdc.log - default = CONSOLE -@end group -@end smallexample - -@iftex -@vfill -@end iftex -@page - -@node kdc.conf, Errors, krb5.conf, Appendix -@appendixsec kdc.conf - -Normally, you should install your @code{kdc.conf} file in the directory -@code{@value{ROOTDIR}/lib/krb5kdc}. However, note that you can override -this default by a pointer in the KDC's @code{krb5.conf} file, or through -the environment variable @samp{KRB5_KDC_PROFILE}. - -Here's an example of a @code{kdc.conf} file: - -@smallexample -@group -[kdcdefaults] - kdc_ports = 88,750 - -[realms] - @value{PRIMARYREALM} = @{ - profile = /etc/krb5.conf - database_name = @value{ROOTDIR}/lib/krb5kdc/principal - admin_database_name = @value{ROOTDIR}/lib/krb5kdc/principal.kadm5 - admin_database_lockfile = @value{ROOTDIR}/lib/krb5kdc/principal.kadm5.lock - admin_keytab = @value{ROOTDIR}/lib/krb5kdc/kadm5.keytab - acl_file = @value{ROOTDIR}/lib/krb5kdc/kadm5.acl - dict_file = @value{ROOTDIR}/lib/krb5kdc/kadm5.dict - key_stash_file = @value{ROOTDIR}/lib/krb5kdc/.k5.@value{PRIMARYREALM} - kadmind_port = 749 - max_life = 10h 0m 0s - max_renewable_life = 7d 0h 0m 0s - master_key_type = des-cbc-crc - supported_enctypes = des-cbc-crc:normal - @} -@end group -@end smallexample - -To add Kerberos V4 support, change the @code{supported_enctypes} line to: - -@smallexample - supported_enctypes = des-cbc-crc:normal des-cbc-crc:v4 -@end smallexample - -@node Errors, kadmin Time Zones, kdc.conf, Appendix +@node Errors, kadmin Time Zones, Appendix, Appendix @appendixsec Kerberos Error Messages @menu @@ -1859,8 +2282,8 @@ To add Kerberos V4 support, change the @code{supported_enctypes} line to: @appendixsubsec Kerberos V5 Library Error Codes This is the Kerberos v5 library error code table. Protocol error codes -are ERROR_TABLE_BASE_krb5 + the protocol error code number; other error -codes start at ERROR_TABLE_BASE_krb5 + 128. +are @* ERROR_TABLE_BASE_krb5 + the protocol error code number; other +error codes start at ERROR_TABLE_BASE_krb5 + 128. @c error table numbering starts at 0 @enumerate 0 diff --git a/doc/build.texinfo b/doc/build.texinfo index 5852c06d0..bee77fe88 100644 --- a/doc/build.texinfo +++ b/doc/build.texinfo @@ -37,14 +37,18 @@ link tree for your build tree. The first step in each of these build procedures is to unpack the source distribution. The Kerberos V5 distribution comes in two compressed tar -files. The first file, which is generally named @file{krb5.src.tar.gz}, -contains the sources for all of Kerberos except for the crypto library, -which is found in the file @file{krb5.crypto.tar.gz}. +files. The first file, which is generally named +@file{krb5-1.0.src.tar.gz}, contains the sources for all of Kerberos +except for the crypto library, which is found in the file +@file{krb5-1.0.crypto.tar.gz}. Both files should be unpacked in the same directory, such as -@file{/u1/krb5}. (In the rest of this document, we will assume that you -have chosen to unpack the Kerberos V5 source distribution in this -directory.) +@file{/u1/krb5-1.0}. (In the rest of this document, we will assume that +you have chosen to unpack the Kerberos V5 source distribution in this +directory. Note that the tarfiles will by default all unpack into the +@file{./krb5-1.0} directory, so that if your current directory is +@file{/u1} when you unpack the tarfiles, you will get +@file{/u1/krb5-1.0/src}, etc.) @node Doing the Build, Testing the Build, Unpacking the Sources, Building Kerberos V5 @@ -73,7 +77,7 @@ use the following abbreviated procedure. @enumerate @item - @code{cd /u1/krb5/src} + @code{cd /u1/krb5-1.0/src} @item @code{./configure} @item @@ -96,9 +100,9 @@ you might use the following procedure: @enumerate @item -@code{mkdir /u1/krb5/pmax} +@code{mkdir /u1/krb5-1.0/pmax} @item - @code{cd /u1/krb5/pmax} + @code{cd /u1/krb5-1.0/pmax} @item @code{../src/configure} @item @@ -118,11 +122,11 @@ you might use the following procedure: @enumerate @item - @code{mkdir /u1/krb5/solaris} + @code{mkdir /u1/krb5-1.0/solaris} @item - @code{cd /u1/krb5/solaris} + @code{cd /u1/krb5-1.0/solaris} @item - @code{/u1/krb5/src/util/lndir `pwd`/../src} + @code{/u1/krb5-1.0/src/util/lndir `pwd`/../src} @item @code{./configure} @item @@ -148,9 +152,10 @@ building Kerberos; see @ref{Doing the Build}.): @menu * The DejaGnu Tests:: +* The KADM5 Tests:: @end menu -@node The DejaGnu Tests, , Testing the Build, Testing the Build +@node The DejaGnu Tests, The KADM5 Tests, Testing the Build, Testing the Build @subsection The DejaGnu Tests Some of the built-in regression tests are setup to use the DejaGnu @@ -158,24 +163,52 @@ framework for running tests. These tests tend to be more comprehensive than the normal built-in tests as they setup test servers and test client/server activities. -DejaGnu may be found wherever GNU software is archived. +DejaGnu may be found wherever GNU software is archived. -Most of the tests are setup to run as a non-privledged user. There are -two series of tests (@samp{rlogind} and @samp{telnetd}) which require -the ability to @samp{rlogin} as root to the local machine. Admittedly, -this does require the use of a @file{.rhosts} file or some other -authenticated means. @footnote{If you are fortunate enough to have a -previous version of Kerberos V5 or V4 installed, and the Kerberos rlogin -is first in your path, you can setup @file{.k5login} or @file{.klogin} -respectively to allow you access.} +Most of the tests are setup to run as a non-privledged user. For some +of the krb-root tests to work properly, either (a) the user running the +tests must not have a .k5login file in the home directory or (b) the +.k5login file must contain an entry for @code{@@KRBTEST.COM}. +There are two series of tests (@samp{rlogind} and @samp{telnetd}) which +require the ability to @samp{rlogin} as root to the local +machine. Admittedly, this does require the use of a @file{.rhosts} file +or some authenticated means. @footnote{If you are fortunate enough to +have a previous version of Kerberos V5 or V4 installed, and the Kerberos +rlogin is first in your path, you can setup @file{.k5login} or +@file{.klogin} respectively to allow you access.} If you cannot obtain root access to your machine, all the other tests will still run. Note however, with DejaGnu 1.2, the "untested testcases" will cause the testsuite to exit with a non-zero exit status which @samp{make} will consider a failure of the testing process. Do not worry about this, as these tests are the last run when @samp{make check} is -executed from the top level of the build tree. - +executed from the top level of the build tree. This problem does not +exist with DejaGnu 1.3. + +@node The KADM5 Tests, , The DejaGnu Tests, Testing the Build +@subsection The KADM5 Tests + +Regression tests for the KADM5 system, including the GSS-RPC, KADM5 +client and server libraries, and kpasswd, are also included in this +release. Each set of KADM5 tests is contained in a sub-directory called +@code{unit-test} directly below the system being tested. For example, +lib/rpc/unit-test contains the tests for GSS-RPC. The tests are all +based on DejaGnu (but they are not actually called part of "The DejaGnu +tests," whose naming predates the inclusion of the KADM5 system). In +addition, they require the Tool Command Language (TCL) header files and +libraries to be available during compilation and some of the tests also +require Perl in order to operate. If all of these resources are not +available during configuration, the KADM5 tests will not run. The TCL +installation directory can be specified with the @code{--with-tcl} +configure option (see @xref{Options to Configure}). The runtest and +perl programs must be in the current execution path. + +If you install DejaGnu, TCL, or Perl after configuring and building +Kerberos and then want to run the KADM5 tests, you will need to +re-configure the tree and run @code{make} at the top level again to make +sure all the proper programs are built. To save time, you actually only +need to reconfigure and build in the directories src/kadmin/testing, +src/lib/rpc, src/lib/kadm5, and src/kpasswd. @node Options to Configure, osconf.h, Testing the Build, Building Kerberos V5 @section Options to Configure @@ -192,17 +225,25 @@ program. Provides help to configure. This will list the set of commonly used options for building Kerberos. -@item --prefix=DIR +@item --prefix=PREFIX By default, Kerberos will install the package's files rooted at `/usr/local' as in `/usr/local/bin', `/usr/local/sbin', etc. If you -desire a different location use this option. +desire a different location, use this option. -@item --exec-prefix=DIR +@item --exec-prefix=EXECPREFIX This option allows one to separate the architecture independent programs from the configuration files and manual pages. +@item --localstatedir=LOCALSTATEDIR + +This option sets the directory for locally modifiable single-machine +data. In Kerberos, this mostly is useful for setting a location for the +KDC data files, as they will be installed in +@code{LOCALSTATEDIR/krb5kdc}, which is by default +@code{PREFIX/var/krb5kdc}. + @item --with-cc=COMPILER Use @code{COMPILER} as the C compiler. @@ -239,10 +280,11 @@ builtin Kerberos V4 library. @item --with-krb4=KRB4DIR -This option enables Kerberos V4 backwards compatibility. The directory -specified by @code{KRB4DIR} specifies where the V4 header files should -be found (@file{/KRB4DIR/include}) as well as where the V4 Kerberos -library should be found (@file{/KRB4DIR/lib}). +This option enables Kerberos V4 backwards compatibility using a +pre-existing Kerberos V4 installation. The directory specified by +@code{KRB4DIR} specifies where the V4 header files should be found +(@file{KRB4DIR/include}) as well as where the V4 Kerberos library should +be found (@file{KRB4DIR/lib}). @item --without-krb4 @@ -280,22 +322,12 @@ you're using slave servers!!! It also causes the database to be modified (and thus needing to be locked) frequently. Please note that the implementors do not regularly test this feature. -@item --with-kdb-db=database - -The configuration process will try to determine a working set of -libraries required to implement the Kerberos database. Configure will -look for interfaces that use or emulate a @samp{ndbm} or @samp{dbm} -library. Failing that, a build in copy of the Berkeley DB code will be -used. You may decide to compile a different interface than the default -by specifying one of "ndbm", "dbm", or "db". +@item --with-tcl=TCLPATH -An important note on platforms where the @samp{ndbm} implementation is -based on @sc{GDBM} (such as the Linux Slackware distribution). @sc{GDBM} -has its own built in file locking which prevents simultaneous access to -the database from two separate processes in which one wants to modify -the database while the otherone only wants to read. (i.e. the KDC and -administrative servers). In this case, you will need to specify the use -of the Berkeley DB. +Some of the unit-tests in the build tree rely upon using a program in +Tcl. The directory specified by @code{TCLPATH} specifies where the Tcl +header file (@file{TCLPATH/include/tcl.h} as well as where the Tcl +library should be found (@file{TCLPATH/lib}). @end table @@ -330,11 +362,6 @@ realms, their KDCs, etc. The profile file format is no longer the same format as Kerberos V4's @file{krb.conf} file. -@item DEFAULT_LNAME_FILENAME - -The pathname to the database that maps authentication names to local -account names. See kdb5_anadd(8). - @item DEFAULT_KEYTAB_NAME The type and pathname to the default server keytab file (the equivalent @@ -371,7 +398,7 @@ of the libraries may be installed on the same system and continue to work. Currently the supported platforms are: NetBSD 1.0A, AIX 3.2.5, AIX 4.1, -Solaris 5.3, Alpha OSF/1 >= 2.1, HP-UX >= 9.X. +Solaris 2.4 (aka SunOS 5.4), Alpha OSF/1 >= 2.1, HP-UX >= 9.X. To enable shared libraries on the above platforms, run the configure script with the option @samp{--enable-shared}. @@ -390,9 +417,10 @@ one in the tree or you will be missing references. @section Operating System Incompatibilities This section details operating system incompatibilities with Kerberos V5 -which have been reported to the developers at MIT. If you find additional -incompatibilities, and/or discover work arounds to such problems, please -send a report to @b{krb5-bugs@@mit.edu}. Thanks! +which have been reported to the developers at MIT. If you find +additional incompatibilities, and/or discover work arounds to such +problems, please send a report via the @code{krb5-send-pr} program. +Thanks! @menu * AIX:: @@ -503,10 +531,6 @@ LD_LIBRARY_PATH environment variable when you compile it. Alternatively you can use the @code{-i} option to @samp{cc}, by using the specifying @code{--with-ccopts=-i} option to @samp{configure}. -Shared library support only works when using the Sunsoft C compiler. We -are currently using version 3.0.1. (The latest GCC may work; this -needs to be tested.) - @node SGI Irix 5.X, Ultrix 4.2/3, Solaris 2.X, OS Incompatibilities @subsection SGI Irix 5.X @@ -581,7 +605,7 @@ that you have made a change that will require that all the @code{--force} option: @example -% cd /u1/krb5/src +% cd /u1/krb5-1.0/src % ./util/reconf --force @end example @@ -601,7 +625,7 @@ Then follow the instructions for building packaged source trees (above). To install the binaries into a binary tree, do: @example -% cd /u1/krb5/src +% cd /u1/krb5-1.0/src % make all % make install DESTDIR=somewhere-else @end example diff --git a/doc/copyright.texinfo b/doc/copyright.texinfo index a91a9ad6e..04601e203 100644 --- a/doc/copyright.texinfo +++ b/doc/copyright.texinfo @@ -23,9 +23,9 @@ It is provided ``as is'' without express or implied warranty. @vskip 12pt @end iftex -The following copyright and permission notice applies to the -OpenVision Kerberos Administration system located in kadmin/create, -kadmin/dbutil, kadmin/server, lib/kadm, and portions of lib/rpc: +The following copyright and permission notice applies to the OpenVision +Kerberos Administration system located in kadmin/create, kadmin/dbutil, +kadmin/passwd, kadmin/server, lib/kadm5, and portions of lib/rpc: @quotation Copyright, OpenVision Technologies, Inc., 1996, All Rights Reserved @@ -36,20 +36,22 @@ terms. If you do not agree to the following terms, do not retrieve the OpenVision Kerberos administration system. You may freely use and distribute the Source Code and Object Code -compiled from it, but this Source Code is provided to you "AS IS" -EXCLUSIVE OF ANY WARRANTY, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES -OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ANY OTHER -WARRANTY, WHETHER EXPRESS OR IMPLIED. IN NO EVENT WILL OPENVISION HAVE -ANY LIABILITY FOR ANY LOST PROFITS, LOSS OF DATA OR COSTS OF PROCUREMENT -OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY SPECIAL, INDIRECT, OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, INCLUDING, WITHOUT -LIMITATION, THOSE RESULTING FROM THE USE OF THE SOURCE CODE, OR THE -FAILURE OF THE SOURCE CODE TO PERFORM, OR FOR ANY OTHER REASON. +compiled from it, with or without modification, but this Source Code is +provided to you "AS IS" EXCLUSIVE OF ANY WARRANTY, INCLUDING, WITHOUT +LIMITATION, ANY WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A +PARTICULAR PURPOSE, OR ANY OTHER WARRANTY, WHETHER EXPRESS OR IMPLIED. +IN NO EVENT WILL OPENVISION HAVE ANY LIABILITY FOR ANY LOST PROFITS, +LOSS OF DATA OR COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR +FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS +AGREEMENT, INCLUDING, WITHOUT LIMITATION, THOSE RESULTING FROM THE USE +OF THE SOURCE CODE, OR THE FAILURE OF THE SOURCE CODE TO PERFORM, OR FOR +ANY OTHER REASON. -OpenVision retains all rights, title, and interest in the donated Source -Code. With respect to OpenVision's copyrights in the donated Source -Code, OpenVision also retains rights to derivative works of the Source -Code whether created by OpenVision or a third party. +OpenVision retains all copyrights in the donated Source Code. OpenVision +also retains copyright to derivative works of the Source Code, whether +created by OpenVision or by a third party. The OpenVision copyright +notice must be preserved if derivative works are made based on the +donated Source Code. OpenVision Technologies, Inc. has donated this Kerberos Administration system to MIT for inclusion in the standard Kerberos 5 distribution. diff --git a/doc/definitions.texinfo b/doc/definitions.texinfo index 93cc3b9a1..19b2b0f55 100644 --- a/doc/definitions.texinfo +++ b/doc/definitions.texinfo @@ -23,8 +23,8 @@ @set PREVRELEASE beta 7 @set INSTALLDIR /usr/@value{LCPRODUCT} @set PREVINSTALLDIR @value{INSTALLDIR} -@set ROOTDIR /usr/@value{LCPRODUCT} -@set BINDIR /usr/@value{LCPRODUCT}/bin +@set ROOTDIR /usr/local +@set BINDIR /usr/local/bin @set SECONDDOMAIN fubar.org @set SECONDREALM FUBAR.ORG @set UPDATED @today diff --git a/doc/install.texinfo b/doc/install.texinfo index 216abf974..f5c4396a8 100644 --- a/doc/install.texinfo +++ b/doc/install.texinfo @@ -16,7 +16,7 @@ @end iftex @include definitions.texinfo -@set EDITION b7-1 +@set EDITION 1.0 @finalout @c don't print black warning boxes @@ -123,10 +123,17 @@ installation procedure is somewhat involved, and requires forethought and planning. @value{COMPANY} has attempted to make this @value{PRODUCT} Installation Guide as concise as possible, rather than making it an exhaustive description of the details of Kerberos. +@ifset CYGNUS Consequently, everything in this guide appears because @value{COMPANY} believes that it is important. Please read and follow these instructions carefully, and if there is anything you do not understand or are not sure of, please don't hesitate to call us. +@end ifset +@ifset MIT +Consequently, everything in this guide appears because @value{COMPANY} +believes that it is important. Please read and follow these +instructions carefully. +@end ifset @node Overview of This Guide, , Please Read the Documentation, Introduction @section Overview of This Guide @@ -134,7 +141,7 @@ or are not sure of, please don't hesitate to call us. The next chapter describes the decisions you need to make before installing @value{PRODUCT}. -Chapter three describes installation procedures for each class of +Chapter four describes installation procedures for each class of Kerberos machines: @enumerate @@ -150,28 +157,20 @@ Slave KDCs. @end enumerate @item -Client machines (user machines): - -@enumerate A -@item -UNIX client machines. - -@item -Windows machines. - -@item -Macintoshes. -@end enumerate +UNIX client machines @item -application server machines +UNIX application server machines @end enumerate @noindent Note that a machine can be both a client machine and an application server. -Chapter four describes our problem reporting system. +Chapter five describes procedure for updating previous installations of +@value{PRODUCT}. + +Chapter six describes our problem reporting system. The appendices give sample configuration files. @@ -225,7 +224,7 @@ Kerberos realm @value{SECONDREALM}. If you need multiple Kerberos realms, @value{COMPANY} recommends that you use descriptive names which end with your domain name, such as -BOSTON.@value{SECONDREALM} and SAN_FRANCISCO.@value{SECONDREALM}. +BOSTON.@value{SECONDREALM} and HOUSTON.@value{SECONDREALM}. @node Mapping Hostnames onto Kerberos Realms, Ports for the KDC and Admin Services, Kerberos Realms, Realm Configuration Decisions @section Mapping Hostnames onto Kerberos Realms @@ -237,6 +236,12 @@ hostname-by-hostname basis. Since greater specificity takes precedence, you would do this by specifying the mappings for a given domain or subdomain and listing the exceptions. +The @value{PRODUCT} System Administrator's Guide contains a thorough +description of the parts of the @code{krb5.conf} file and what may be +specified in each. A sample @code{krb5.conf} file appears in +@ref{krb5.conf}. You should be able to use this file, substituting the +relevant information for your Kerberos instllation for the samples. + @node Ports for the KDC and Admin Services, Slave KDCs, Mapping Hostnames onto Kerberos Realms, Realm Configuration Decisions @section Ports for the KDC and Admin Services @@ -271,9 +276,10 @@ Have at least one slave KDC as a backup, for when the master KDC is down, is being upgraded, or is otherwise unavailable. @item -If your network is split such that a network outage is likely to cause -some segment or segments of the network to become cut off or isolated, -have a slave KDC accessible to each segment. +If your network is split such that a network outage is likely to cause a +network partition (some segment or segments of the network to become cut +off or isolated from other segments), have a slave KDC accessible to +each segment. @item If possible, have at least one slave KDC in a different building from @@ -304,7 +310,7 @@ effect. If the propagation time is longer than this maximum reasonable time (@i{e.g.,} you have a particularly large database, you have a lot of -slaves, and/or you experience frequent network delays), you may wish to +slaves, or you experience frequent network delays), you may wish to cut down on your propagation delay by performing the propagation in parallel. To do this, have the master KDC propagate the database to one set of slaves, and then have each of these slaves propagate the database @@ -325,20 +331,9 @@ The sections of this chapter describe procedures for installing @item The KDCs -@item -Client machines - -@enumerate A @item UNIX client machines -@item -Windows machines - -@item -Macintoshes -@end enumerate - @item UNIX Application Servers @end enumerate @@ -359,12 +354,12 @@ regular intervals. All database changes (such as password changes) are made on the master KDC. Slave KDCs provide Kerberos ticket-granting services, but not database -access. This allows clients to continue to obtain tickets when the -master KDC is unavailable. +administration. This allows clients to continue to obtain tickets when +the master KDC is unavailable. -@value{COMPANY}'s recommends that you install all of your KDCs to be -able to function as either the master or one of the slaves. This will -enable you to easily switch your master KDC with one of the slaves if +@value{COMPANY} recommends that you install all of your KDCs to be able +to function as either the master or one of the slaves. This will enable +you to easily switch your master KDC with one of the slaves if necessary. (@xref{Switching Master and Slave KDCs}.) This installation procedure is based on that recommendation. @@ -401,9 +396,20 @@ Modify the configuration files, @code{/etc/krb5.conf} (@pxref{krb5.conf}) and @code{@value{ROOTDIR}/var/krb5kdc/kdc.conf} (@pxref{kdc.conf}) to reflect the correct information (such as the hostnames and realm name) for your realm. @value{COMPANY} recommends -that you keep @code{krb5.conf} in @code{/etc}. The @code{krb5.conf} -file may contain a pointer to @code{kdc.conf}, which you need to change -if you want to move @code{kdc.conf} to another location. +that you keep @code{krb5.conf} in @code{/etc}. + +Among the settings in your @code{/etc/krb5.conf} file, be sure to create +a @code{[logging]} stanza so that the KDC and kadmind will generate +logging output. For example: + +@smallexample +@group +[logging] + kdc = FILE:/var/log/krb5kdc.log + admin_server = FILE:/var/log/kadmin.log + default = FILE:/var/log/krb5lib.log +@end group +@end smallexample @node Create the Database, Add Administrators to the Acl File, Edit the Configuration Files, Install the Master KDC @subsubsection Create the Database @@ -430,11 +436,10 @@ words that can be found in a dictionary, any common or popular name, especially a famous person (or cartoon character), your username in any form (@i{e.g.}, forward, backward, repeated twice, @i{etc.}), and any of the sample keys that appear in this manual. One example of a key which -would be good if it did not appear in this manual is ``MITiys4K5!'', -which represents the sentence ``@value{COMPANY} is your source for -Kerberos 5!'' (It's the first letter of each word, substituting the -numeral ``4'' for the word ``for'', and includes the punctuation mark at -the end.) +might be good if it did not appear in this manual is ``MITiys4K5!'', +which represents the sentence ``MIT is your source for Kerberos 5!'' +(It's the first letter of each word, substituting the numeral ``4'' for +the word ``for'', and includes the punctuation mark at the end.) The following is an example of how to create a Kerberos database and stash file on the master KDC, using the @code{kdb5_util} command. (The @@ -554,7 +559,10 @@ instance ``root'', you would add the following line to the acl file: Next you need to add administrative principals to the Kerberos database. (You must add at least one now.) To do this, use @code{kadmin.local} -@emph{on the master KDC}, as in the following example: +@emph{on the master KDC}. The administrative principals you create +should be the ones you added to the ACL file (see @xref{Add +Administrators to the Acl File}). In the following example, the +administration principal @code{admin/admin} is created: @smallexample @group @@ -575,6 +583,8 @@ kadmin.local:} @end group @end smallexample + + @node Create a kadmind Keytab, Start the Kerberos Daemons, Add Administrators to the Kerberos Database, Install the Master KDC @subsubsection Create a kadmind Keytab @@ -606,7 +616,7 @@ kadmin.local:} quit @noindent As specified in the @samp{-k} argument, @code{ktadd} will save the -extracted keytab as @code{@value{ROOTDIR}/var/krb5kdc/kadm5.keytab}. +extracted keytab as @* @code{@value{ROOTDIR}/var/krb5kdc/kadm5.keytab}. The filename you use must be the one specified in your @code{kdc.conf} file. @@ -628,6 +638,21 @@ these daemons to start up automatically at boot time, you can add them to the KDC's @code{/etc/rc} or @code{/etc/inittab} file. You need to have a stash file in order to do this. +You can verify that they started properly by checking for their startup +messages in the logging locations you defined in @code{/etc/krb5.conf} +(see @xref{Edit the Configuration Files}). For example: + +@smallexample +@b{shell%} tail /var/log/krb5kdc.log +Dec 02 12:35:47 beeblebrox krb5kdc[3187](info): commencing operation +@b{shell%} tail /var/log/kadmin.log +Dec 02 12:35:52 beeblebrox kadmind[3189](info): starting +@end smallexample + +Any errors the daemons encounter while starting will also be listed in +the logging output. + + @node Install the Slave KDCs, Back on the Master KDC, Install the Master KDC, Installing KDCs @subsection Install the Slave KDCs @@ -657,15 +682,15 @@ named @value{KDCSLAVE1}.@value{PRIMARYDOMAIN} and @smallexample @group @b{shell%} @value{ROOTDIR}/sbin/kadmin -@b{kadmin:} addprinc -randpass host/@value{KDCSERVER}.@value{PRIMARYDOMAIN} +@b{kadmin:} addprinc -randkey host/@value{KDCSERVER}.@value{PRIMARYDOMAIN} @b{WARNING: no policy specified for "host/@value{KDCSERVER}.@value{PRIMARYDOMAIN}@@@value{PRIMARYREALM}"; defaulting to no policy. Principal "host/@value{KDCSERVER}.@value{PRIMARYDOMAIN}@@@value{PRIMARYREALM}" created. -kadmin:} addprinc -randpass host/@value{KDCSLAVE1}.@value{PRIMARYDOMAIN} +kadmin:} addprinc -randkey host/@value{KDCSLAVE1}.@value{PRIMARYDOMAIN} @b{WARNING: no policy specified for "host/@value{KDCSLAVE1}.@value{PRIMARYDOMAIN}@@@value{PRIMARYREALM}"; defaulting to no policy. Principal "host/@value{KDCSLAVE1}.@value{PRIMARYDOMAIN}@@@value{PRIMARYREALM}" created.} -@b{kadmin:} addprinc -randpass host/@value{KDCSLAVE2}.@value{PRIMARYDOMAIN} +@b{kadmin:} addprinc -randkey host/@value{KDCSLAVE2}.@value{PRIMARYDOMAIN} @b{WARNING: no policy specified for "host/@value{KDCSLAVE2}.@value{PRIMARYDOMAIN}@@@value{PRIMARYREALM}"; defaulting to no policy. Principal "host/@value{KDCSLAVE2}.@value{PRIMARYDOMAIN}@@@value{PRIMARYREALM}" created. @@ -758,8 +783,8 @@ KDC: kerberos 88/udp kdc # Kerberos authentication (udp) kerberos 88/tcp kdc # Kerberos authentication (tcp) krb5_prop 754/tcp # Kerberos slave propagation -kerberos-adm 749/tcp # Kerberos 5 admin/changepw (tcp) -kerberos-adm 749/udp # Kerberos 5 admin/changepw (udp) +kerberos-adm 749/tcp # Kerberos 5 admin/changepw (tcp) +kerberos-adm 749/udp # Kerberos 5 admin/changepw (udp) eklogin 2105/tcp # Kerberos encrypted rlogin @end group @end smallexample @@ -1350,7 +1375,8 @@ terminology. @node Bug Reports for Kerberos V5, Files, Upgrading Existing Kerberos V5 Installations, Top @chapter Bug Reports for @value{PRODUCT} -@include bug-report.texinfo + +@include send-pr.texinfo @node Files, , Bug Reports for Kerberos V5, Top @appendix Files diff --git a/doc/krb425.texinfo b/doc/krb425.texinfo index 2ff2b3ec8..e78d4e6ac 100644 --- a/doc/krb425.texinfo +++ b/doc/krb425.texinfo @@ -3,11 +3,11 @@ @c definitions added by jcb. @c %**start of header @c guide -@setfilename Kerberos-V4-to-V5.info +@setfilename krb425.info @settitle Upgrading to Kerberos V5 from Kerberos V4 -@c @setchapternewpage odd @c chapter begins on next odd page -@setchapternewpage on @c chapter begins on next page -@smallbook @c Format for 7" X 9.25" paper +@setchapternewpage odd @c chapter begins on next odd page +@c @setchapternewpage on @c chapter begins on next page +@c @smallbook @c Format for 7" X 9.25" paper @c %**end of header @paragraphindent 0 @@ -16,7 +16,7 @@ @end iftex @include definitions.texinfo -@set EDITION 0.1 alpha +@set EDITION 1.0 @set UPDATED October 8, 1996 @finalout @c don't print black warning boxes @@ -34,15 +34,13 @@ @include copyright.texinfo @end titlepage -@node Top, Introduction, (dir), (dir) +@node Top, Copyright, (dir), (dir) @ifinfo This document describes how to convert to @value{PRODUCT} from Kerberos V4. -@include copyright.texinfo -@end ifinfo - @menu +* Copyright:: * Introduction:: * Configuration Files:: * Upgrading KDCs:: @@ -51,7 +49,13 @@ This document describes how to convert to @value{PRODUCT} from Kerberos V4. * Firewall Considerations:: @end menu -@node Introduction, Configuration Files, Top, Top +@node Copyright, Introduction, Top, Top +@unnumbered Copyright +@include copyright.texinfo + +@end ifinfo + +@node Introduction, Configuration Files, Copyright, Top @chapter Introduction As with most software upgrades, @value{PRODUCT} is generally backward @@ -173,7 +177,7 @@ Create a dump of the V4 database in the directory where your V5 database will reside by issuing the command: @smallexample -% kdb_util dump @value{INSTALLDIR}/lib/krb5kdc/v4-dump +% kdb_util dump @value{ROOTDIR}/var/krb5kdc/v4-dump @end smallexample @item @@ -266,6 +270,7 @@ telnet stream tcp nowait root @end group @end smallexample +@ifset CYGNUS @strong{N.B.}: As noted in the @value{PRODUCT} Installation Guide, if you have some clients running older versions of Kerberos V5 (beta 6@footnote{@value{PRODUCT} is based on the MIT beta 7 release.} or @@ -273,6 +278,15 @@ earlier), checksums were done differently in those versions, which will cause authentication to fail. To get around this problem, have the @code{klogind} and @code{kshd} daemons ignore checksums, by replacing each @code{-c} flag above with @code{-i}. +@end ifset +@ifclear CYGNUS +@strong{N.B.}: As noted in the @value{PRODUCT} Installation Guide, if +you have some clients running older versions of Kerberos V5 (beta 6 or +earlier), checksums were done differently in those versions, which will +cause authentication to fail. To get around this problem, have the +@code{klogind} and @code{kshd} daemons ignore checksums, by replacing +each @code{-c} flag above with @code{-i}. +@end ifclear For an @emph{insecure} server, make the changes described in the @value{PRODUCT} Installation Guide. @@ -288,7 +302,7 @@ follows: @group @b{#} @value{ROOTDIR}/sbin/ktutil @b{ktutil:} rst /etc/krb-srvtab -@b{ktutil:} wkt /etc/v5srvtab +@b{ktutil:} wkt /etc/krb5.keytab @b{ktutil:} q @b{#} @end group diff --git a/doc/krb5-protocol/krb5.constants b/doc/krb5-protocol/krb5.constants index ed70559fa..e7cc5b80e 100644 --- a/doc/krb5-protocol/krb5.constants +++ b/doc/krb5-protocol/krb5.constants @@ -13,6 +13,8 @@ des-cbc-md4 2 8 0 8 des-cbc-md5 3 8 0 8 4 des3-cbc-md5 5 8 0 8 + 6 +des3-cbc-sha1 7 8 0 8 0x8003 -------------------------------+-------------------+------------- @@ -26,7 +28,10 @@ des-mac-k 5 8 rsa-md4-des-k 6 16 rsa-md5 7 16 rsa-md5-des 8 24 -rsa-md5-des3 9 24 + 9 + 10 +nist-sha1 11 20 +hmac-sha1-des3 12 20 -------------------------------+----------------- padata type |padata-type value @@ -42,6 +47,8 @@ PA-OSF-DCE 8 PA-CYBERSAFE-SECUREID 9 PA-AFS3-SALT 10 PA-ETYPE-INFO 11 +PAM-SAM-CHALLENGE 12 +PAM-SAM-RESPONSE 13 -------------------------------+------------- authorization data type |ad-type value @@ -120,6 +127,7 @@ KDC_ERR_KEY_EXPIRED 23 Password has expired - change to reset KDC_ERR_PREAUTH_FAILED 24 Pre-authentication information was invalid KDC_ERR_PREAUTH_REQUIRED 25 Additional pre-authentication required* KDC_ERR_SERVER_NOMATCH 26 Requested server and ticket don't match +KDC_ERR_MUST_USE_USER2USER 27 Server principal valid for user2user only KRB_AP_ERR_BAD_INTEGRITY 31 Integrity check on decrypted field failed KRB_AP_ERR_TKT_EXPIRED 32 Ticket expired KRB_AP_ERR_TKT_NYV 33 Ticket not yet valid diff --git a/doc/send-pr.texinfo b/doc/send-pr.texinfo index 628b14192..9209ffd56 100644 --- a/doc/send-pr.texinfo +++ b/doc/send-pr.texinfo @@ -1,88 +1,75 @@ -If you have problems installing @value{PRODUCT}, please use the -@code{send-pr} program to fill out a Problem Report. +In any complex software, there will be bugs. If you have successfully +built and installed @value{PRODUCT}, please use the +@code{krb5-send-pr} program to fill out a Problem Report. -The @code{send-pr} program is installed in the directory -@code{@value{ROOTDIR}/bin}. - -@need 1100 -Before using @code{send-pr} for the first time, you need to install your -customer support ID into the program, by typing the command: - -@smallexample -@b{shell%} install-sid @i{customerID} -@end smallexample +Bug reports that include proposed fixes are especially welcome. If you +do include fixes, please send them using either context diffs or unified +diffs (using @samp{diff -c} or @samp{diff -u}, respectively). -@noindent replacing @i{customerID} with your customer ID, which your -sales representative will supply. +The @code{krb5-send-pr} program is installed in the directory +@code{@value{ROOTDIR}/sbin}. -The @code{send-pr} program enters the problem report into our Problem -Report Management System (PRMS), which automatically assigns it to the -engineer best able to help you with problems in the assigned category. +The @code{krb5-send-pr} program enters the problem report into our +Problem Report Management System (PRMS), which automatically assigns it +to the engineer best able to help you with problems in the assigned +category. +@ifset CYGNUS The engineer will work with you via email, telephone, or both, and all email related to this Problem Report will be tracked by PRMS for future -reference. If the engineer does not reply to you after a certain time, -a reminder is automatically generated. If you need to talk to someone -else in our organization about the problem (@i{e.g.}, if the engineer -gets hit by a truck), we can find out what the current state is through -the PR number. @value{COMPANY} uses PRMS for almost all of the real -problems we handle. - -The @code{send-pr} program will try to intelligently fill in as many -fields as it can. You need to choose the @dfn{category}, @dfn{class}, -@dfn{severity}, and @dfn{priority} of the problem, as well as giving us -as much information as you can about its exact nature. +reference. If you need to talk to someone else in our organization +about the problem (@i{e.g.}, if the engineer gets hit by a truck), we +can find out what the current state is through the PR number. +@end ifset + +The @code{krb5-send-pr} program will try to intelligently fill in as +many fields as it can. You need to choose the @dfn{category}, +@dfn{class}, @dfn{severity}, and @dfn{priority} of the problem, as well +as giving us as much information as you can about its exact nature. @need 1000 The PR @b{category} will be one of: @smallexample @group -kerberos kerbnet doc help-request -info-request install query-pr id-request -send-pr +krb5-admin krb5-appl krb5-build krb5-clients +krb5-doc krb5-kdc krb5-libs krb5-misc +pty telnet test @end group @end smallexample -In general, if specific knowledge about Kerberos is requried to answer a -PR, use the @i{kerberos} or @i{doc} categories. The @i{install} -category is for problems retrieving the code off the media (@i{e.g.}, -the data on a tape seems to be corrupted.) Questions about the -installation procedures described in this document would fall under the -category @i{kerberos}. The @i{help-request} and @i{info-request} -categories are for general questions about your contract, or other -issues not necessarily related to @value{PRODUCT}. Use @i{query-pr} to -receive a current copy of your Problem Report, @i{id-request} if you -need a customer ID, and @i{send-pr} if you're having trouble using -send-pr. If your question is related to @value{PRODUCT} and you're not -sure what the most appropriate category should be, use @i{kerberos}. -The engineer can change the category if necessary. +@noindent +Choose the category that best describes the area under which your +problem falls. The @b{class} can be @dfn{sw-bug}, @dfn{doc-bug}, @dfn{change-request}, -or @dfn{support}. The first two are exactly as their names imply. The -@i{change-request} class is to inform us of changes, such as new email -addresses or new contact information. The @i{support} class is intended -for general questions about using the @value{PRODUCT} clients or -libraries. +or @dfn{support}. The first two are exactly as their names imply. Use +@i{change-request} when the software is behaving according to +specifications, but you want to request changes in some feature or +behavior. The @i{support} class is intended for more general questions +about building or using @value{PRODUCT}. The @b{severity} of the problem indicates the problem's impact on the -usability of the @value{PRODUCT} software package. If a problem is -@dfn{critical}, that means the product, component or concept is -completely non-operational, or some essential functionality is missing, -and no workaround is known. A @dfn{serious} problem is one in which the -product, component or concept is not working properly or significant -functionality is missing. Problems that would otherwise be considered -@i{critical} are rated @i{serious} when a workaround is known. A -@dfn{non-critical} problem is one that is indeed a problem, but one that -is having a minimal affect on your ability to use @value{PRODUCT}. -@i{E.g.}, The product, component or concept is working in general, but -lacks features, has irritating behavior, does something wrong, or -doesn't match its documentation. The default severity is @i{serious}. +usability of @value{PRODUCT}. If a problem is @dfn{critical}, that +means the product, component or concept is completely non-operational, +or some essential functionality is missing, and no workaround is known. +A @dfn{serious} problem is one in which the product, component or +concept is not working properly or significant functionality is missing. +Problems that would otherwise be considered @i{critical} are rated +@i{serious} when a workaround is known. A @dfn{non-critical} problem is +one that is indeed a problem, but one that is having a minimal effect on +your ability to use @value{PRODUCT}. @i{E.g.}, The product, component +or concept is working in general, but lacks features, has irritating +behavior, does something wrong, or doesn't match its documentation. The +default severity is @i{serious}. The @b{priority} indicates how urgent this particular problem is in relation to your work. Note that low priority does not imply low -importance. @value{COMPANY} considers all problems important, and -encourages its customers to be realistic about priority ratings. A -priority of @dfn{high} means a solution is needed as soon as possible. +importance. +@ifset CYGNUS +@value{COMPANY} considers all problems important, and +encourages its customers to be realistic about priority ratings. +@end ifset +A priority of @dfn{high} means a solution is needed as soon as possible. A priority of @dfn{medium} means the problem should be solved no later than the next release. A priority of @dfn{low} means the problem should be solved in a future release, but it is not important to your work how @@ -94,10 +81,8 @@ you are faced with a hard deadline. Conversely, a serious problem might have a low priority if the feature it is disabling is one that you do not need. -The @b{release} is as labeled on the software that was shipped. -@i{e.g.}, @code{kerbnet-@value{RELEASE}}. It is important that you tell -us which release you are using, and whether or not you have made any -private changes. +It is important that you fill in the @i{release} field and tell us +what changes you have made, if any. Bug reports that include proposed fixes are especially welcome. If you include proposed fixes, please send them using either context diffs @@ -113,50 +98,35 @@ look like this: @smallexample @group -To: bugs@@cygnus.com -Subject: "KDC reply did not match expectations" error -From: joe.smith@@toasters.com -Reply-To: joe.smith@@toasters.com -X-send-pr-version: 3.97-96q1 - ->Submitter-Id: toastersinc ->Confidential: yes ->Originator: Joe Smith (+1 415 903 1400) ->Organization: ------ -Joe Smith joe.smith@@toasters.com -Toasters, Inc. - ``The best UI in the world'' +To: krb5-bugs@@mit.edu +Subject: misspelled "Kerberos" in title of installation guide +From: jcb +Reply-To: jcb +Cc: +X-send-pr-version: 3.99 ->Synopsis: "KDC reply did not match expectations" error message + +>Submitter-Id: mit +>Originator: Jeffrey C. Gilman Bigler +>Organization: +mit +>Confidential: no +>Synopsis: Misspelled "Kerberos" in title of installation guide >Severity: non-critical >Priority: low ->Category: kerberos ->Class: sw-bug ->Release: kerbnet-1.0 +>Category: krb5-doc +>Class: doc-bug +>Release: 1.0-development >Environment: -NetBSD viola 1.1 NetBSD 1.1 (ATHENAADP) #0: Tue May 21 00:31:42 EDT 1996 -i386 -System: Intel P166 -Architecture: NetBSD - + +System: ULTRIX imbrium 4.2 0 RISC +Machine: mips >Description: - - Getting "KDC reply did not match expectations" message. This - does not seem to be affecting anything else. - + Misspelled "Kerberos" in title of "Kerboros V5 Installation Guide" >How-To-Repeat: - - - - - - It happens when I type kinit. - + N/A >Fix: - - - None. Sorry. + Correct the spelling. @end group @end smallexample @@ -164,40 +134,7 @@ Architecture: NetBSD @vfill @end iftex -@page -If the @code{send-pr} program does not work for you, you can use the -following template instead: - -@smallexample -@group -To: bugs@@cygnus.com -Subject: -From: -Reply-To: -X-send-pr-version: none (typed manually) - ->Submitter-Id: ->Originator: ->Organization: - ->Confidential: <[ yes | no ] (one line)> ->Synopsis: ->Severity: <[ non-critical | serious | critical ] (one line)> ->Priority: <[ low | medium | high ] (one line)> ->Category: ->Class: <[ sw-bug | doc-bug | change-request | support ] (one line)> ->Release: cns-9?q? ->Environment: - -System: -Architecture: - - ->Description: - ->How-To-Repeat: - ->Fix: - -@end group -@end smallexample +If the @code{krb5-send-pr} program does not work for you, or if you did +not get far enough in the process to have an installed and working +@code{krb5-send-pr}, you can generate your own form, using the above as +an example. diff --git a/doc/user-guide.texinfo b/doc/user-guide.texinfo index d068396c3..c60be114b 100644 --- a/doc/user-guide.texinfo +++ b/doc/user-guide.texinfo @@ -14,7 +14,7 @@ @end iftex @include definitions.texinfo -@set EDITION b7-1 +@set EDITION 1.0 @finalout @c don't print black warning boxes @@ -67,9 +67,15 @@ This file describes how to use the @value{PRODUCT} client programs. @node Introduction, Kerberos V5 Tutorial, Copyright, Top @chapter Introduction +@ifset CYGNUS @value{PRODUCT} is based on the Kerberos V5 authentication system -developed at MIT. Kerberos is named for the three-headed watchdog from -Greek mythology, who guarded the entrance to the underworld. +developed at MIT. +@end ifset +@ifset MIT +Kerberos V5 is an authentication system developed at MIT. +@end ifset +Kerberos is named for the three-headed watchdog from Greek mythology, +who guarded the entrance to the underworld. Under Kerberos, a client (generally either a user or a service) sends a request for a ticket to the @i{Key Distribution Center} (KDC). The KDC @@ -98,10 +104,6 @@ used to. @value{PRODUCT} is a @dfn{single-sign-on} system, which means that you have to type your password only once per session, and Kerberos does the authenticating and encrypting transparently. -@iftex -@vfil -@end iftex -@need 2000 @menu * What is a Ticket?:: * What is a Kerberos Principal?:: @@ -130,10 +132,6 @@ new resort. The difference is that the @value{PRODUCT} programs notice that you have the weekend ski pass, and get the lift ticket for you, so you don't have to perform the transactions yourself. -@iftex -@vfil -@end iftex -@need 2000 @node What is a Kerberos Principal?, , What is a Ticket?, Introduction @section What is a Kerberos Principal? @@ -166,7 +164,7 @@ the realm @code{@value{PRIMARYREALM}}. @end itemize @node Kerberos V5 Tutorial, Kerberos V5 Reference, Introduction, Top -@chapter @value{PRODUCT} Tutorial +@chapter Kerberos V5 Tutorial This tutorial is intended to familiarize you with the @value{PRODUCT} client programs. We will represent your prompt as ``@code{shell%}''. @@ -215,7 +213,7 @@ versions, when you type their command names. On many systems, Kerberos is built into the login program, and you get tickets automatically when you log in. Other programs, such as -/@code{rsh}, @code{rcp}, @code{telnet}, and @code{rlogin}, can forward +@code{rsh}, @code{rcp}, @code{telnet}, and @code{rlogin}, can forward copies of your tickets to the remote host. Most of these programs also automatically destroy your tickets when they exit. However, @value{COMPANY} recommends that you explicitly destroy your Kerberos @@ -336,10 +334,6 @@ in an error. Note also that most systems specify a maximum ticket lifetime. If you request a longer ticket lifetime, it will be automatically truncated to the maximum lifetime. -@iftex -@vfil -@end iftex -@need 3000 @node Viewing Your Tickets with klist, Destroying Your Tickets with kdestroy, Obtaining Tickets with kinit, Ticket Management @subsection Viewing Your Tickets with klist @@ -397,9 +391,6 @@ host ticket for the host ticket, which telnet then presented to the host @code{@value{RANDOMHOST1}.@value{PRIMARYDOMAIN}}, and she was allowed to log in without typing her password. -@iftex -@vfil -@end iftex @need 3000 Suppose your Kerberos tickets allow you to log into a host in another @@ -488,10 +479,6 @@ shell%} @end group @end smallexample -@iftex -@vfil -@end iftex -@need 2000 @node Destroying Your Tickets with kdestroy, , Viewing Your Tickets with klist, Ticket Management @subsection Destroying Your Tickets with kdestroy @@ -524,10 +511,6 @@ shell%} @end group @end smallexample -@iftex -@vfil -@end iftex -@need 2000 @node Password Management, Kerberos V5 Applications, Ticket Management, Kerberos V5 Tutorial @section Password Management @@ -544,10 +527,6 @@ administrator, for any reason. You should change your password frequently, particularly any time you think someone may have found out what it is. -@iftex -@vfil -@end iftex -@need 2000 @menu * Changing Your Password:: * Password Advice:: @@ -613,11 +592,7 @@ this might be anywhere from a few minutes to an hour or more. If you need to get new Kerberos tickets shortly after changing your password, try the new password. If the new password doesn't work, try again using the old one. -@iftex -@vfil -@end iftex -@need 2000 @node Password Advice, Granting Access to Your Account, Changing Your Password, Password Management @subsection Password Advice @@ -650,9 +625,6 @@ listed in this manual include: @noindent Note: don't actually use any of the above passwords. They're only meant to show you how to make up a good password. Passwords that appear in a manual are the first ones intruders will try. -@iftex -@vfil -@end iftex @need 3800 @value{PRODUCT} allows your system administrators to automatically @@ -683,10 +655,6 @@ shell%} displayed if you choose a bad password, so the message you see may be different from the above example. -@iftex -@vfil -@end iftex -@need 2000 @node Granting Access to Your Account, , Password Advice, Password Management @subsection Granting Access to Your Account @@ -736,13 +704,8 @@ users to become root locally, or to log in remotely as @code{root}, without their having to give out the root password, and without anyone having to type the root password over the network. -@iftex -@vfil -@end iftex -@need 2000 - @node Kerberos V5 Applications, , Password Management, Kerberos V5 Tutorial -@section @value{PRODUCT} Applications +@section Kerberos V5 Applications @value{PRODUCT} is a @dfn{single-sign-on} system. This means that you only have to type your password once, and the @value{PRODUCT} programs @@ -758,10 +721,6 @@ space of a few seconds. The @value{PRODUCT} applications are versions of existing UNIX network programs with the Kerberos features added. -@iftex -@vfil -@end iftex -@need 2000 @menu * Overview of Additional Features:: * telnet:: @@ -795,10 +754,6 @@ This section of the tutorial assumes you are familiar with the non-Kerberos versions of these programs, and highlights the Kerberos functions added in the @value{PRODUCT} package. -@iftex -@vfil -@end iftex -@need 2000 @node telnet, rlogin, Overview of Additional Features, Kerberos V5 Applications @subsection telnet @@ -841,10 +796,6 @@ turns on encryption. turns off encryption. @end table -@iftex -@vfil -@end iftex - @need 4000 For example, if @code{@value{RANDOMUSER2}} wanted to use the standard UNIX telnet to connect to the machine @@ -879,9 +830,6 @@ was sent over the network unencrypted. If an intruder were watching network traffic at the time, that intruder would know @code{@value{RANDOMUSER2}}'s password. -@iftex -@vfil -@end iftex @need 4000 If, on the other hand, @code{@value{RANDOMUSER1}} wanted to use the @value{PRODUCT} telnet to connect to the machine @@ -915,9 +863,6 @@ destroys them when it exits. The full set of options to @value{PRODUCT} @code{telnet} are discussed in the Reference section of this manual. (@pxref{telnet Reference}) -@iftex -@vfil -@end iftex @need 2000 @node rlogin, FTP, telnet, Kerberos V5 Applications @subsection rlogin @@ -981,9 +926,6 @@ was sent over the network unencrypted. If an intruder were watching network traffic at the time, that intruder would know @code{@value{RANDOMUSER2}}'s password. -@iftex -@vfil -@end iftex @need 4000 If, on the other hand, @code{@value{RANDOMUSER1}} wanted to use @value{PRODUCT} rlogin to connect to the machine @@ -1013,10 +955,6 @@ destroys them when it exits. The full set of options to @value{PRODUCT} @code{rlogin} are discussed in the Reference section of this manual. (@pxref{rlogin Reference}) -@iftex -@vfil -@end iftex -@need 2000 @node FTP, rsh, rlogin, Kerberos V5 Applications @subsection FTP @@ -1077,14 +1015,9 @@ ftp> quit The full set of options to @value{PRODUCT} @code{FTP} are discussed in the Reference section of this manual. (@pxref{FTP Reference}) -@iftex -@vfil -@end iftex -@need 2000 @node rsh, rcp, FTP, Kerberos V5 Applications @subsection rsh -@need 1000 The @value{PRODUCT} @code{rsh} program works exactly like the standard UNIX rlogin program, with the following Kerberos features added: @@ -1118,7 +1051,7 @@ turns off encryption. @need 1800 For example, if your Kerberos tickets allowed you to run programs on the -host @code{@value{RANDOMHOST2}@@@value{SECONDDOMAIN}} as root, you could +host @* @code{@value{RANDOMHOST2}@@@value{SECONDDOMAIN}} as root, you could run the @samp{date} program as follows: @smallexample @@ -1135,10 +1068,6 @@ destroys them when it exits. The full set of options to @value{PRODUCT} @code{rsh} are discussed in the Reference section of this manual. (@pxref{rsh Reference}) -@iftex -@vfil -@end iftex -@need 2000 @node rcp, ksu, rsh, Kerberos V5 Applications @subsection rcp @@ -1170,10 +1099,6 @@ transparently. The full set of options to @value{PRODUCT} @code{rcp} are discussed in the Reference section of this manual. (@pxref{rcp Reference}) -@iftex -@vfil -@end iftex -@need 2000 @node ksu, , rcp, Kerberos V5 Applications @subsection ksu @@ -1353,7 +1278,7 @@ The full set of options to @value{PRODUCT} @code{ksu} are discussed in the Reference section of this manual. (@pxref{ksu Reference}) @node Kerberos V5 Reference, Kerberos Glossary, Kerberos V5 Tutorial, Top -@chapter @value{PRODUCT} Reference +@chapter Kerberos V5 Reference This section will include copies of the manual pages for the @value{PRODUCT} client programs. You can read the manual entry for any diff --git a/src/ChangeLog b/src/ChangeLog index f89bb96bc..aadb2fd38 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,23 @@ +Mon Nov 25 19:42:53 1996 Tom Yu + + * Makefile.in: Comment out distclean and realclean so no one will + be tempted to use them. [PR 222] + +Fri Nov 22 23:51:07 1996 Theodore Ts'o + + * Makefile.in: All changes for the Macintosh port. Translate '%' + characters in Macfile.tmpl to '/' characters. Include the + mac/SAP directory in the kerbsrc.mac.tar tarball. Rename + the kerbsrc.tar tarball to kerbsrc.mac.tar, so that the + target name in the Makefile matches the taget which is + actually generated. Use mac/mkbindirs.sh to build the + binary hierarchy for the Macintosh build process. + +Wed Nov 20 13:28:00 1996 Theodore Ts'o + + * Makefile.in (awk-windows-mac): Copy gssapi.hin to gssapi.h to + make Win16 build work. + Thu Nov 7 23:55:02 1996 Tom Yu * aclocal.m4 (LinkFileDir, LinkFile): AC_REQUIRE the AC_LN_S macro diff --git a/src/Makefile.in b/src/Makefile.in index 738aa4095..a0881016d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -63,11 +63,14 @@ clean-unix:: mostlyclean: clean -distclean: clean - rm -f Makefile config.status - -realclean: distclean - rm -f TAGS +# This doesn't work; if you think you need it, you should use a +# separate build directory. +# +# distclean: clean +# rm -f Makefile config.status +# +# realclean: distclean +# rm -f TAGS dist: $(DISTFILES) echo cpio-`sed -e '/version_string/!d' \ @@ -220,7 +223,7 @@ FILES= ./* \ WINFILES= windows/* windows/cns/* windows/wintel/* windows/gss/* MACFILES= mac/* mac/kconfig/* mac/libraries/* mac/telnet-k5-auth/* \ - mac/gss-sample/* config/* include/* include/krb5/* \ + mac/gss-sample/* mac/SAP/* config/* include/* include/krb5/* \ include/krb5/asn.1/* include/krb5/stock/* include/sys/* \ ./patchlevel.h @@ -235,7 +238,8 @@ CLEANUP= util/profile/profile.h util/profile/prof_err.[ch] \ include/adm_err.h include/profile.h include/krb5.h \ include/krb5/osconf.h \ lib/gssapi/generic/gssapi_err_generic.[ch] \ - lib/gssapi/krb5/gssapi_err_krb5.[ch] winfile.list macfile.list + lib/gssapi/krb5/gssapi_err_krb5.[ch] winfile.list macfile.list \ + lib/gssapi/generic/gssapi.h kerbsrc.win: kerbsrc.zip @@ -299,13 +303,22 @@ Macfile: macfile.list Makefile.sav -e 's/^/:bin:PPC:/' macsrcsk5` >> Macfile echo INCLUDES = `sed -n -e 's/\(.*:\)[^:]*\.h$$/-i \1/p' macfile.maclist | sort -u` >> Macfile echo "" >> Macfile - tr '/:\\' ':\304\266'< mac/Makefile.tmpl >> Macfile + tr '%/:\\' '/:\304\266'< mac/Makefile.tmpl >> Macfile + +mac-bin-dirs: + rm -rf bin + mkdir bin bin/68K bin/CFM-68K bin/PPC + sh mac/mkbindirs.sh bin/68K $(MAC_SUBDIRS) + sh mac/mkbindirs.sh bin/CFM-68K $(MAC_SUBDIRS) + sh mac/mkbindirs.sh bin/PPC $(MAC_SUBDIRS) -kerbsrc.mac: awk-windows-mac macfile.list Macfile +kerbsrc.mac.tar: awk-windows-mac macfile.list mac-bin-dirs Macfile cp mac/libraries/autoconf.h include/autoconf.h mv Macfile Makefile - tar cvf kerbsrc.tar Makefile include/autoconf.h `cat macfile.list` + tar cvf kerbsrc.mac.tar Makefile include/autoconf.h bin \ + `cat macfile.list` rm -f $(CLEANUP) + rm -rf bin rm -f include/autoconf.h Makefile macsrc* macfile.maclist mv Makefile.sav Makefile @@ -343,3 +356,4 @@ awk-windows-mac: cat $(PR)/profile.hin $(PR)prof_err.h > $(PR)profile.h cp $(PR)profile.h include/profile.h cp $(INC)/krb5/stock/osconf.h $(INC)/krb5 + cp $(GG)gssapi.hin $(GG)gssapi.h diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index f9aa5ad88..2329a1298 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,81 @@ +Tue Jan 20 21:42:06 1998 Tom Yu + + * krlogind.c (protocol): Declare pibuf and fibuf as being BUFSIZ + bytes long, rather than 1024. Fixes an Irix bug. [krb5-appl/527] + +Thu Nov 20 16:42:54 1997 Tom Yu + + * krlogind.c (recvauth): Fix args in call to + rd_and_store_for_creds. [krb5-appl/502] + +Mon Nov 17 20:55:31 1997 Tom Yu + + * krshd.c: Don't set checksum_ignored to 1 if checksum_required is + 0; also, if a krb5 client passes in a checksum, check it + regardless of whether checksum_required is true. [krb5-appl/500] + +Wed Nov 12 19:03:02 1997 Tom Yu + + * forward.c (rd_and_store_for_creds): Don't do the chown. Avoids + a security hole. [krb5-appl/494] + + * krshd.c (recvauth): chown the ccache explicitly, as + rd_and_store_for_creds no longer does so. [krb5-appl/494] + +Thu Nov 6 22:04:26 1997 Theodore Y. Ts'o + + * v4rcp.c: Use error_message(errno) instead of using + sys_errlist[errno]. This avoids the hair of deciding + whether or not we need to declare sys_errlist or use + strerror(), etc., since com_err has all of that complexity + anyway. Also fixed lots of -Wall nits. + +Mon Nov 3 15:25:48 1997 Tom Yu + + * krlogind.c (doit): Fix up potential buffer overrun. + [krb5-appl/488] + +Tue Mar 18 12:34:03 1997 Sam Hartman + + [326] * login.c(doit): Preserve terminal even without -p. + +Sat Dec 28 21:06:43 1996 Sam Hartman + + * login.c: Force environment variables like HOME to be set even if + -p given. + +Thu Feb 27 10:58:07 1997 Sam Hartman + + * krshd.c: Allow user to login with / as home directory if homedir + not found. [167] + +Fri Dec 6 00:53:08 1996 Theodore Y. Ts'o + + * v4rcp.c: Extend the platform-specific braindamage so that + FreeBSD works. This whole file is eventually going to + need serious rototilling to make it even vaguely correct. + [PR #284] + +Fri Dec 6 00:02:25 1996 Tom Yu + + * loginpaths.h: Add catch-all entries for LPATH and RPATH in case + we run across something that we haven't hardcoded paths for + yet. [267] + +Thu Dec 5 21:58:28 1996 Tom Yu + + * login.M: v5srvtab -> krb5.keytab [279] + +Sun Nov 24 23:35:22 1996 Ezra Peisach + + * login.c (try_afscall): Change to take pointer to function + instead of only calling setpag(). [krb5-appl/190] + +Fri Nov 22 15:46:46 1996 unknown + + * kcmd.c (kcmd): use sizeof instead of h_length to determine + number of bytes of addr to copy from DNS response [krb5-misc/211] + Thu Nov 14 14:30:28 1996 Barry Jaspan * krcp.c: don't print our own error message if kcmd returns -1 (it diff --git a/src/appl/bsd/forward.c b/src/appl/bsd/forward.c index 54594b9b9..e22fc1d98 100644 --- a/src/appl/bsd/forward.c +++ b/src/appl/bsd/forward.c @@ -21,7 +21,6 @@ #if defined(KERBEROS) || defined(KRB5) #include -#include #include #include #include @@ -30,22 +29,18 @@ /* Decode, decrypt and store the forwarded creds in the local ccache. */ krb5_error_code -rd_and_store_for_creds(context, auth_context, inbuf, ticket, lusername, ccache) +rd_and_store_for_creds(context, auth_context, inbuf, ticket, ccache) krb5_context context; krb5_auth_context auth_context; krb5_data *inbuf; krb5_ticket *ticket; - char *lusername; krb5_ccache *ccache; { krb5_creds ** creds; krb5_error_code retval; char ccname[35]; - struct passwd *pwd; *ccache = NULL; - if (!(pwd = (struct passwd *) getpwnam(lusername))) - return ENOENT; if (retval = krb5_rd_cred(context, auth_context, inbuf, &creds, NULL)) return(retval); @@ -67,19 +62,6 @@ rd_and_store_for_creds(context, auth_context, inbuf, ticket, lusername, ccache) if (retval = krb5_cc_store_cred(context, *ccache, *creds)) goto cleanup; - if (retval = chown(ccname+5, pwd->pw_uid, -1)) { - /* - * If the file owner is the same as the user id then return ok. - * This is for testing only --proven - */ - struct stat statbuf; - - if (stat(ccname + 5, & statbuf) == 0) { - if (statbuf.st_uid == pwd->pw_uid) - retval = 0; - } - } - cleanup: krb5_free_creds(context, *creds); return retval; diff --git a/src/appl/bsd/kcmd.c b/src/appl/bsd/kcmd.c index 4b66c3795..6f4583596 100644 --- a/src/appl/bsd/kcmd.c +++ b/src/appl/bsd/kcmd.c @@ -180,7 +180,7 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm, return (-1); } sin.sin_family = hp->h_addrtype; - memcpy((caddr_t)&sin.sin_addr,hp->h_addr, hp->h_length); + memcpy((caddr_t)&sin.sin_addr,hp->h_addr, sizeof(sin.sin_addr)); sin.sin_port = rport; if (connect(s, (struct sockaddr *)&sin, sizeof (sin)) >= 0) break; @@ -200,7 +200,7 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm, perror(0); hp->h_addr_list++; memcpy((caddr_t)&sin.sin_addr,hp->h_addr_list[0], - hp->h_length); + sizeof(sin.sin_addr)); fprintf(stderr, "Trying %s...\n", inet_ntoa(sin.sin_addr)); continue; diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index 7773de517..e260aac66 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -547,7 +547,10 @@ int syncpipe[2]; } /* Save hostent information.... */ - else strcpy(rhost_name,hp->h_name); + else { + strncpy(rhost_name,hp->h_name,sizeof (rhost_name)); + rhost_name[sizeof (rhost_name) - 1] = '\0'; + } if (fromp->sin_family != AF_INET) fatal(f, "Permission denied - Malformed from address\n"); @@ -847,7 +850,7 @@ int control(pty, cp, n) void protocol(f, p) int f, p; { - unsigned char pibuf[1024], fibuf[1024], *pbp, *fbp; + unsigned char pibuf[BUFSIZ], fibuf[BUFSIZ], *pbp, *fbp; register pcc = 0, fcc = 0; int cc; char cntl; @@ -1558,7 +1561,7 @@ recvauth(valid_checksum) if ((inbuf.length) && /* Forwarding being done, read creds */ (status = rd_and_store_for_creds(bsd_context, auth_context, &inbuf, - ticket, lusername, &ccache))) { + ticket, &ccache))) { fatal(netf, "Can't get forwarded credentials"); } return 0; diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c index 8859e3a9f..6ff5d3a1f 100644 --- a/src/appl/bsd/krshd.c +++ b/src/appl/bsd/krshd.c @@ -420,9 +420,6 @@ int main(argc, argv) syslog(LOG_WARNING , "setsockopt (SO_LINGER): %m"); #endif - if (!checksum_required && !checksum_ignored) - checksum_ignored = 1; - if (checksum_required&&checksum_ignored) { syslog(LOG_CRIT, "Checksums are required and ignored; these options are mutually exclusive--check the documentation."); fatal(fd, "Configuration error: mutually exclusive options specified"); @@ -1014,11 +1011,11 @@ void doit(f, fromp) #endif /*CRAY*/ if (chdir(pwd->pw_dir) < 0) { - syslog(LOG_ERR , - "Principal %s (%s@%s) for local user %s has no home directory.\n", - kremuser, remuser, hostname, locuser); - error("No remote directory.\n"); + if(chdir("/") < 0) { + error("No remote directory.\n"); goto signout_please; + } + pwd->pw_dir = "/"; } #ifdef KERBEROS @@ -1722,6 +1719,9 @@ recvauth(netf, peersin, valid_checksum) krb5_authenticator *authenticator; krb5_ticket *ticket; krb5_rcache rcache; + struct passwd *pwd; + uid_t uid; + gid_t gid; *valid_checksum = 0; len = sizeof(laddr); @@ -1827,7 +1827,7 @@ recvauth(netf, peersin, valid_checksum) &authenticator))) return status; - if (authenticator->checksum && checksum_required) { + if (authenticator->checksum && !checksum_ignored) { struct sockaddr_in adr; int adr_length = sizeof(adr); char * chksumbuf = (char *) malloc(strlen(cmdbuf)+strlen(locuser)+32); @@ -1877,12 +1877,24 @@ recvauth(netf, peersin, valid_checksum) } if (inbuf.length) { /* Forwarding being done, read creds */ + pwd = getpwnam(locuser); + if (!pwd) { + error("Login incorrect.\n"); + exit(1); + } + uid = pwd->pw_uid; + gid = pwd->pw_gid; if ((status = rd_and_store_for_creds(bsd_context, auth_context, &inbuf, - ticket, locuser, &ccache))) { + ticket, &ccache))) { error("Can't get forwarded credentials: %s\n", error_message(status)); exit(1); } + if (chown(krb5_cc_get_name(bsd_context, ccache), uid, gid) == -1) { + error("Can't chown forwarded credentials: %s\n", + error_message(errno)); + exit(1); + } } krb5_free_ticket(bsd_context, ticket); return 0; diff --git a/src/appl/bsd/login.M b/src/appl/bsd/login.M index 0603d16bd..f48fd0c40 100644 --- a/src/appl/bsd/login.M +++ b/src/appl/bsd/login.M @@ -25,7 +25,7 @@ possible.) It will also attempt to run .I aklog to get \fIAFS\fP tokens for the user. The version 5 tickets will be tested against a local -.I v5srvtab +.I krb5.keytab if it is available, in order to verify the tickets, before letting the user in. However, if the password matches the entry in \fI/etc/passwd\fP the user will be unconditionally allowed (permitting diff --git a/src/appl/bsd/login.c b/src/appl/bsd/login.c index 7542a23a8..42a069c64 100644 --- a/src/appl/bsd/login.c +++ b/src/appl/bsd/login.c @@ -1023,7 +1023,8 @@ static sigtype sigsys () siglongjmp(setpag_buf, 1); } -static int try_afscall () +static int try_afscall (scall) + int (*scall)(); { handler sa, osa; volatile int retval = 0; @@ -1032,7 +1033,7 @@ static int try_afscall () handler_init (sa, sigsys); handler_swap (SIGSYS, sa, osa); if (sigsetjmp(setpag_buf, 1) == 0) { - setpag (); + (*scall)(); retval = 1; } handler_set (SIGSYS, osa); @@ -1326,6 +1327,12 @@ int rewrite_ccache = 1; /*try to write out ccache*/ */ if (eflag) lgetstr(term, sizeof(term), "Terminal type"); + else if (!(kflag || Kflag )) /*Preserve terminal if not read over net */ + { + if (getenv("TERM")) + strncpy(term, getenv("TERM"), sizeof(term)); + } + term_init (rflag || kflag || Kflag || eflag); for (cnt = getdtablesize(); cnt > 2; cnt--) @@ -1828,16 +1835,16 @@ int rewrite_ccache = 1; /*try to write out ccache*/ read_env_vars_from_file ("/etc/TIMEZONE"); #else if (tz) - setenv ("TZ", tz, 0); + setenv ("TZ", tz, 1); #endif if (ccname) - setenv("KRB5CCNAME", ccname, 0); + setenv("KRB5CCNAME", ccname, 1); - setenv("HOME", pwd->pw_dir, 0); - setenv("PATH", LPATH, 0); - setenv("USER", pwd->pw_name, 0); - setenv("SHELL", pwd->pw_shell, 0); + setenv("HOME", pwd->pw_dir, 1); + setenv("PATH", LPATH, 1); + setenv("USER", pwd->pw_name, 1); + setenv("SHELL", pwd->pw_shell, 1); if (term[0] == '\0') (void) strncpy(term, stypeof(tty), sizeof(term)); diff --git a/src/appl/bsd/loginpaths.h b/src/appl/bsd/loginpaths.h index 2f2de0bb8..99d28b091 100644 --- a/src/appl/bsd/loginpaths.h +++ b/src/appl/bsd/loginpaths.h @@ -94,3 +94,13 @@ #define RPATH "/usr/bin:/bin" #endif #endif + +/* catch-all entries for operating systems we haven't looked up + hardcoded paths for */ +#ifndef LPATH +#define LPATH "/usr/bin:/bin" +#endif + +#ifndef RPATH +#define RPATH "/usr/bin:/bin" +#endif diff --git a/src/appl/bsd/v4rcp.c b/src/appl/bsd/v4rcp.c index 0a1ad33a0..4ed931584 100644 --- a/src/appl/bsd/v4rcp.c +++ b/src/appl/bsd/v4rcp.c @@ -37,8 +37,15 @@ static char sccsid[] = "@(#)rcp.c 5.10 (Berkeley) 9/20/88"; */ #ifdef KERBEROS #include "krb5.h" +#include "com_err.h" #endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif #include #include #include @@ -55,9 +62,6 @@ static char sccsid[] = "@(#)rcp.c 5.10 (Berkeley) 9/20/88"; #include #include #include -#ifdef POSIX -#include -#endif #include #include #include @@ -65,6 +69,17 @@ static char sccsid[] = "@(#)rcp.c 5.10 (Berkeley) 9/20/88"; #ifdef KERBEROS #include #include + + +void sink(), source(), rsource(), usage(); +/*VARARGS*/ +void error(); +int response(); +#if !defined(HAS_UTIMES) +int utimes(); +#endif + + #if 0 #include #else @@ -304,15 +319,7 @@ int encryptflag = 0; kstream krem; int errs; -#ifdef POSIX -void lostconn(); -#else -int lostconn(); -#endif -int errno; -#ifndef __NetBSD__ -extern char *sys_errlist[]; -#endif +krb5_sigtype lostconn(); int iamremote, targetshouldbedirectory; int iamrecursive; int pflag; @@ -330,27 +337,18 @@ struct buffer { #define NULLBUF (struct buffer *) 0 -/*VARARGS*/ -int error(); - #define ga() (void) kstream_write (krem, "", 1) -main(argc, argv) +int main(argc, argv) int argc; char **argv; { - char *targ, *host, *src; - char *suser, *tuser, *thost; - int i; - char buf[BUFSIZ], cmd[50 + REALM_SZ]; char portarg[20], rcpportarg[20]; #ifdef ATHENA static char curhost[256]; #endif /* ATHENA */ #ifdef KERBEROS char realmarg[REALM_SZ + 5]; - long authopts; - char **orig_argv = save_argv(argc, argv); #endif /* KERBEROS */ portarg[0] = '\0'; @@ -450,9 +448,10 @@ main(argc, argv) #endif /* KERBEROS */ } usage(); + return 1; } -verifydir(cp) +void verifydir(cp) char *cp; { struct stat stb; @@ -462,11 +461,11 @@ verifydir(cp) return; errno = ENOTDIR; } - error("rcp: %s: %s.\n", cp, sys_errlist[errno]); + error("rcp: %s: %s.\n", cp, error_message(errno)); exit(1); } -source(argc, argv) +void source(argc, argv) int argc; char **argv; { @@ -481,7 +480,7 @@ source(argc, argv) for (x = 0; x < argc; x++) { name = argv[x]; if ((f = open(name, 0)) < 0) { - error("rcp: %s: %s\n", name, sys_errlist[errno]); + error("rcp: %s: %s\n", name, error_message(errno)); continue; } if (fstat(f, &stb) < 0) @@ -523,7 +522,7 @@ notreg: } } (void) sprintf(buf, "C%04o %ld %s\n", - stb.st_mode&07777, stb.st_size, last); + (unsigned int) stb.st_mode&07777, stb.st_size, last); kstream_write (krem, buf, strlen (buf)); if (response() < 0) { (void) close(f); @@ -546,7 +545,7 @@ notreg: if (readerr == 0) ga(); else - error("rcp: %s: %s\n", name, sys_errlist[readerr]); + error("rcp: %s: %s\n", name, error_message(readerr)); (void) response(); } } @@ -557,7 +556,7 @@ notreg: #include #endif -rsource(name, statp) +void rsource(name, statp) char *name; struct stat *statp; { @@ -572,7 +571,7 @@ rsource(name, statp) #endif if (d == 0) { - error("rcp: %s: %s\n", name, sys_errlist[errno]); + error("rcp: %s: %s\n", name, error_message(errno)); return; } last = strrchr(name, '/'); @@ -589,13 +588,14 @@ rsource(name, statp) return; } } - (void) sprintf(buf, "D%04o %d %s\n", statp->st_mode&07777, 0, last); + (void) sprintf(buf, "D%04o %d %s\n", + (unsigned int) statp->st_mode&07777, 0, last); kstream_write (krem, buf, strlen (buf)); if (response() < 0) { closedir(d); return; } - while (dp = readdir(d)) { + while ((dp = readdir(d))) { if (dp->d_ino == 0) continue; if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) @@ -613,7 +613,7 @@ rsource(name, statp) (void) response(); } -response() +int response() { char resp, c, rbuf[BUFSIZ], *cp = rbuf; @@ -642,14 +642,10 @@ response() exit(1); } /*NOTREACHED*/ + return -1; } -#ifdef POSIX -void -#else -int -#endif -lostconn() +krb5_sigtype lostconn() { if (iamremote == 0) @@ -679,7 +675,7 @@ struct timeval *tvp; } #endif -sink(argc, argv) +void sink(argc, argv) int argc; char **argv; { @@ -738,7 +734,7 @@ sink(argc, argv) return; } -#define getnum(t) (t) = 0; while (isdigit(*cp)) (t) = (t) * 10 + (*cp++ - '0'); +#define getnum(t) (t) = 0; while (isdigit((int) *cp)) (t) = (t) * 10 + (*cp++ - '0'); if (*cp == 'T') { setimes++; cp++; @@ -781,7 +777,7 @@ sink(argc, argv) if (*cp++ != ' ') SCREWUP("mode not delimited"); size = 0; - while (isdigit(*cp)) + while (isdigit((int) *cp)) size = size * 10 + (*cp++ - '0'); if (*cp++ != ' ') SCREWUP("size not delimited"); @@ -807,13 +803,13 @@ sink(argc, argv) setimes = 0; if (utimes(nambuf, tv) < 0) error("rcp: can't set times on %s: %s\n", - nambuf, sys_errlist[errno]); + nambuf, error_message(errno)); } continue; } if ((of = open(nambuf, O_WRONLY|O_CREAT|O_TRUNC, mode)) < 0) { bad: - error("rcp: %s: %s\n", nambuf, sys_errlist[errno]); + error("rcp: %s: %s\n", nambuf, error_message(errno)); continue; } #ifdef NO_FCHMOD @@ -843,7 +839,7 @@ sink(argc, argv) error("rcp: dropped connection"); else error("rcp: %s\n", - sys_errlist[errno]); + error_message(errno)); exit(1); } amt -= j; @@ -863,7 +859,7 @@ sink(argc, argv) #ifndef __SCO__ if (ftruncate(of, size)) error("rcp: can't truncate %s: %s\n", - nambuf, sys_errlist[errno]); + nambuf, error_message(errno)); #endif (void) close(of); (void) response(); @@ -871,10 +867,10 @@ sink(argc, argv) setimes = 0; if (utimes(nambuf, tv) < 0) error("rcp: can't set times on %s: %s\n", - nambuf, sys_errlist[errno]); + nambuf, error_message(errno)); } if (wrerr) - error("rcp: %s: %s\n", nambuf, sys_errlist[errno]); + error("rcp: %s: %s\n", nambuf, error_message(errno)); else ga(); } @@ -893,7 +889,7 @@ allocbuf(bp, fd, blksize) struct stat stb; if (fstat(fd, &stb) < 0) { - error("rcp: fstat: %s\n", sys_errlist[errno]); + error("rcp: fstat: %s\n", error_message(errno)); return (NULLBUF); } size = roundup(stb.st_blksize, blksize); @@ -914,7 +910,7 @@ allocbuf(bp, fd, blksize) } /*VARARGS1*/ -error(fmt, a1, a2, a3, a4, a5) +void error(fmt, a1, a2, a3, a4, a5) char *fmt; int a1, a2, a3, a4, a5; { @@ -929,7 +925,7 @@ error(fmt, a1, a2, a3, a4, a5) (void) write(2, buf+1, strlen(buf+1)); } -usage() +void usage() { fprintf(stderr, "v4rcp: this program only acts as a server, and is not for user function.\n"); @@ -977,7 +973,7 @@ char *sp; void answer_auth() { - int sin_len, status; + int status; long authopts = KOPT_DO_MUTUAL; char instance[INST_SZ]; char version[9]; @@ -985,6 +981,8 @@ answer_auth() char *envaddr; #if 0 + int sin_len; + sin_len = sizeof (struct sockaddr_in); if (getpeername(rem, &foreign, &sin_len) < 0) { perror("getpeername"); @@ -997,7 +995,7 @@ answer_auth() exit(1); } #else - if (envaddr = getenv("KRB5LOCALADDR")) { + if ((envaddr = getenv("KRB5LOCALADDR"))) { #ifdef HAVE_INET_ATON inet_aton(envaddr, &local.sin_addr); #else @@ -1009,7 +1007,7 @@ answer_auth() fprintf(stderr, "v4rcp: couldn't get local address (KRB5LOCALADDR)\n"); exit(1); } - if (envaddr = getenv("KRB5REMOTEADDR")) { + if ((envaddr = getenv("KRB5REMOTEADDR"))) { #ifdef HAVE_INET_ATON inet_aton(envaddr, &foreign.sin_addr); #else diff --git a/src/appl/gss-sample/ChangeLog b/src/appl/gss-sample/ChangeLog index 5da0236f0..110e7224a 100644 --- a/src/appl/gss-sample/ChangeLog +++ b/src/appl/gss-sample/ChangeLog @@ -1,3 +1,9 @@ +Fri Nov 22 15:48:02 1996 unknown + + * gss-client.c (connect_to_server): use sizeof instead of h_length + to determine number of bytes of addr to copy from DNS response + [krb5-misc/211] + Sun Oct 27 22:04:59 1996 Ezra Peisach * configure.in: Add USE_GSSAPI_LIBRARY diff --git a/src/appl/gss-sample/gss-client.c b/src/appl/gss-sample/gss-client.c index 170bc6340..b91ea87aa 100644 --- a/src/appl/gss-sample/gss-client.c +++ b/src/appl/gss-sample/gss-client.c @@ -79,7 +79,7 @@ int connect_to_server(host, port) } saddr.sin_family = hp->h_addrtype; - memcpy((char *)&saddr.sin_addr, hp->h_addr, hp->h_length); + memcpy((char *)&saddr.sin_addr, hp->h_addr, sizeof(saddr.sin_addr)); saddr.sin_port = htons(port); if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) { diff --git a/src/appl/gssftp/ftp/ChangeLog b/src/appl/gssftp/ftp/ChangeLog index 9224e5dd8..c1531a236 100644 --- a/src/appl/gssftp/ftp/ChangeLog +++ b/src/appl/gssftp/ftp/ChangeLog @@ -1,3 +1,8 @@ +Fri Nov 22 15:48:19 1996 unknown + + * ftp.c (hookup): use sizeof instead of h_length to determine + number of bytes of addr to copy from DNS response [krb5-misc/211] + Fri Sep 27 16:05:09 1996 Tom Yu * cmds.c (setpeer): Apply jik's fix so "-n" actually works as diff --git a/src/appl/gssftp/ftp/ftp.c b/src/appl/gssftp/ftp/ftp.c index fb6a5632b..0641416bc 100644 --- a/src/appl/gssftp/ftp/ftp.c +++ b/src/appl/gssftp/ftp/ftp.c @@ -155,7 +155,7 @@ hookup(host, port) } hisctladdr.sin_family = hp->h_addrtype; memcpy((caddr_t)&hisctladdr.sin_addr, hp->h_addr_list[0], - hp->h_length); + sizeof(hisctladdr.sin_addr)); (void) strncpy(hostnamebuf, hp->h_name, sizeof(hostnamebuf)); } hostname = hostnamebuf; @@ -177,7 +177,8 @@ hookup(host, port) perror((char *) 0); hp->h_addr_list++; memcpy((caddr_t)&hisctladdr.sin_addr, - hp->h_addr_list[0], hp->h_length); + hp->h_addr_list[0], + sizeof(hisctladdr.sin_addr)); fprintf(stdout, "Trying %s...\n", inet_ntoa(hisctladdr.sin_addr)); (void) close(s); diff --git a/src/appl/gssftp/ftpd/ChangeLog b/src/appl/gssftp/ftpd/ChangeLog index 2a2e348ac..08870272c 100644 --- a/src/appl/gssftp/ftpd/ChangeLog +++ b/src/appl/gssftp/ftpd/ChangeLog @@ -1,3 +1,17 @@ +Fri Feb 6 13:25:28 1998 Theodore Y. Ts'o + + * popen.c (ftpd_popen): Make sure you can't overrun the argv[] and + gargv[] arrays. (Patch submitted by dima@best.net). + +Sun Dec 21 18:17:53 1997 Tom Yu + + * logwtmp.c (ftp_logwtmp): Rename logwtmp to ftp_logwtmp to avoid + collision with native logwtmp. Also, return void rather than + int. + + * ftpd.c: Rename logwtmp to ftp_logwtmp to avoid collision with + native logwtmp. + Tue Nov 12 00:04:00 1996 Tom Yu * ftpd.c (ftpd_userok): Don't undconditionally return -1. diff --git a/src/appl/gssftp/ftpd/ftpd.c b/src/appl/gssftp/ftpd/ftpd.c index b4a5794b9..950ca9c2f 100644 --- a/src/appl/gssftp/ftpd/ftpd.c +++ b/src/appl/gssftp/ftpd/ftpd.c @@ -691,7 +691,7 @@ end_login() (void) seteuid((uid_t)0); if (logged_in) - logwtmp(ttyline, "", ""); + ftp_logwtmp(ttyline, "", ""); pw = NULL; logged_in = 0; guest = 0; @@ -805,7 +805,7 @@ pass(passwd) /* open wtmp before chroot */ (void)sprintf(ttyline, "ftp%d", getpid()); - logwtmp(ttyline, pw->pw_name, remotehost); + ftp_logwtmp(ttyline, pw->pw_name, remotehost); logged_in = 1; if (guest) { @@ -1671,7 +1671,7 @@ dologout(status) { if (logged_in) { (void) seteuid((uid_t)0); - logwtmp(ttyline, "", ""); + ftp_logwtmp(ttyline, "", ""); } /* beware of flushing buffers after a SIGPIPE */ _exit(status); diff --git a/src/appl/gssftp/ftpd/logwtmp.c b/src/appl/gssftp/ftpd/logwtmp.c index 36f7e1309..846819a8f 100644 --- a/src/appl/gssftp/ftpd/logwtmp.c +++ b/src/appl/gssftp/ftpd/logwtmp.c @@ -59,7 +59,7 @@ static int fd = -1; * after first call, for use with ftp (which may chroot * after login, but before logout). */ -logwtmp(line, name, host) +void ftp_logwtmp(line, name, host) char *line, *name, *host; { struct utmp ut; diff --git a/src/appl/gssftp/ftpd/popen.c b/src/appl/gssftp/ftpd/popen.c index 89f29a206..ffafe0529 100644 --- a/src/appl/gssftp/ftpd/popen.c +++ b/src/appl/gssftp/ftpd/popen.c @@ -58,6 +58,8 @@ static char sccsid[] = "@(#)popen.c 5.9 (Berkeley) 2/25/91"; static int *pids; static int fds; +#define MAX_ARGV 100 +#define MAX_GARGV 1000 FILE * ftpd_popen(program, type) @@ -66,7 +68,7 @@ ftpd_popen(program, type) register char *cp; FILE *iop; int argc, gargc, pdes[2], pid; - char **pop, *argv[100], *gargv[1000], *vv[2]; + char **pop, *argv[MAX_ARGV], *gargv[MAX_GARGV], *vv[2]; extern char **ftpglob(), **copyblk(); if (*type != 'r' && *type != 'w' || type[1]) @@ -83,10 +85,12 @@ ftpd_popen(program, type) return(NULL); /* break up string into pieces */ - for (argc = 0, cp = program;; cp = NULL) + for (argc = 0, cp = program; argc < MAX_ARGV - 1; cp = NULL) if (!(argv[argc++] = strtok(cp, " \t\n"))) break; - for (argc = 0; argv[argc]; argc++) argv[argc] = strdup(argv[argc]); + argv[MAX_ARGV-1] = NULL; + for (argc = 0; argv[argc]; argc++) + argv[argc] = strdup(argv[argc]); /* glob each piece */ gargv[0] = argv[0]; @@ -97,7 +101,7 @@ ftpd_popen(program, type) pop = copyblk(vv); } argv[argc] = (char *)pop; /* save to free later */ - while (*pop && gargc < 1000) + while (*pop && gargc < MAX_GARGV) gargv[gargc++] = *pop++; } gargv[gargc] = NULL; diff --git a/src/appl/popper/Imakefile b/src/appl/popper/Imakefile deleted file mode 100644 index d46dc301b..000000000 --- a/src/appl/popper/Imakefile +++ /dev/null @@ -1,93 +0,0 @@ -# $Source$ -# $Author$ -# $Id$ -# -# Copyright 1991 by the Massachusetts Institute of Technology. -# 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 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. -# -# - -# Options are: -# BIND43 - If you are using BSD 4.3 domain -# name service. -# DEBUG - Include the debugging code. Note: You -# still have to use the -d or -t flag to -# enable debugging. -# HAVE_VSPRINTF - If the vsprintf functions are -# available -# on your system. -# SYSLOG42 - For BSD 4.2 syslog (default is BSD 4.3 -# syslog). -# STRNCASECMP - If you do not have strncasecmp() -# KERBEROS - If you want authentication vis Kerberos -# (tom) -# KERBEROS_PASSWD_HACK - Use popper as passwd server -# NOSTATUS - Don't create a Mail(1)-like -# Status: header - -#if defined(OS_BSD_RENO) || defined(OS_Ultrix) || defined(OS_SunOS4) || defined(OS_BSD) -BINDDEF=-DBIND43 -#else -/* assume it's not there; not really critical since we are using Kerberos to - beef up the normal IP-address checking stuff */ -BINDDEF= -#endif - -#if 0 - -/* Zephyr stuff not needed yet, since spop isn't done yet. */ -DEFINES = -DHAVE_VSPRINTF -DKERBEROS -DKRB5 -DNOSTATUS -DDEBUG $(BINDDEF) $(ZEPHDEFS) -LOCAL_LIBRARIES = $(ZEPHLIBS) $(KLIB) -DEP_LIBS= $(ZEPHDEPLIB) $(DEPKLIB) - -#else - -DEFINES = -DHAVE_VSPRINTF -DKERBEROS -DKRB5 -DNOSTATUS -DDEBUG $(BINDDEF) -LOCAL_LIBRARIES = $(KLIB) -DEP_LIBS= $(DEPKLIB) - -#endif -OBJS = pop_dele.o pop_dropcopy.o pop_dropinfo.o \ - pop_get_command.o pop_get_subcommand.o pop_init.o \ - pop_last.o pop_list.o pop_log.o pop_lower.o \ - pop_msg.o pop_parse.o pop_pass.o pop_quit.o \ - pop_rset.o pop_send.o pop_stat.o pop_updt.o \ - pop_user.o pop_xtnd.o pop_xmit.o popper.o -SRCS = pop_dele.c pop_dropcopy.c pop_dropinfo.c \ - pop_get_command.c pop_get_subcommand.c pop_init.c \ - pop_last.c pop_list.c pop_log.c pop_lower.c \ - pop_msg.c pop_parse.c pop_pass.c pop_quit.c \ - pop_rset.c pop_send.c pop_stat.c pop_updt.c \ - pop_user.c pop_xtnd.c pop_xmit.c popper.c $(SPOP_SRCS) -#if 0 -SPOP_OBJS = pop_enter.o -SPOP_SRCS = pop_enter.c -#endif - -all:: popper - -NormalProgramTarget(popper,$(OBJS),$(DEP_LIBS),$(LOCAL_LIBRARIES),) -Krb5InstallServerProgram(popper) - -#if 0 -NormalProgramTarget(spop,$(SPOP_OBJS),$(DEP_LIBS),$(LOCAL_LIBRARIES),) -Krb5InstallServerProgram(spop) -#endif - -DependTarget() diff --git a/src/appl/sample/sserver/ChangeLog b/src/appl/sample/sserver/ChangeLog index ba1d2974f..be41b716c 100644 --- a/src/appl/sample/sserver/ChangeLog +++ b/src/appl/sample/sserver/ChangeLog @@ -1,3 +1,10 @@ +Thu Dec 5 19:44:05 1996 Tom Yu + + * sserver.M: remove ref's to "/krb5" [PR 279] + + * sserver.M: v5srvtab -> krb5.keytab; also kdb5_edit -> kadmin [PR + 279] + Thu Nov 7 15:24:43 1996 Theodore Ts'o * sserver.c (main): Check the error return from diff --git a/src/appl/sample/sserver/sserver.M b/src/appl/sample/sserver/sserver.M index f0ea721b0..e879067e6 100644 --- a/src/appl/sample/sserver/sserver.M +++ b/src/appl/sample/sserver/sserver.M @@ -44,9 +44,8 @@ The service name used by \fIsserver\fP and \fIsclient\fP is \fBsample\fP. Hence, \fIsserver\fP will require that there be a keytab entry for the service "sample/hostname.domain.name@REALM.NAME". This keytab is generated using the -.IR krb5_edit(8) -program. The keytab file is installed in whatever -directory is defined by V5Srvtabdir (usually /etc) as "v5srvtab". +.IR kadmin(8) +program. The keytab file is usually installed as "/etc/krb5.keytab". .PP The .B \-S @@ -57,7 +56,7 @@ option allows for a different keytab than the default. using a line in /etc/inetd.conf that looks like this: .PP -sample stream tcp nowait root /krb5/sbin/sserver sserver +sample stream tcp nowait root /usr/local/sbin/sserver sserver .PP Since \fBsample\fP is normally not a port defined in /etc/services, you will usually have to add a line to /etc/services which looks like this: @@ -66,7 +65,7 @@ sample 13135/tcp .PP When using \fIsclient,\fP you will first have to have an entry in the Kerberos database, by using -.IR kdb5_edit(8), +.IR kadmin(8), and then you have to get Kerberos tickets, by using .IR kinit(8). @@ -109,10 +108,10 @@ didn't restart \fIinetd\fP after editing inetd.conf. .PP 4) \fIsclient\fP returns the error: .PP -/krb5/bin/sclient: Server not found in Kerberos database while using sendauth +sclient: Server not found in Kerberos database while using sendauth .PP This means that the "sample/hostname@LOCAL.REALM" service was not -defined in the Kerberos database; it should be created using \fIkdb5_edit,\fP +defined in the Kerberos database; it should be created using \fIkadmin,\fP and a keytab file needs to be generated to make the key for that service principal available for \fIssclient\fP. .PP diff --git a/src/appl/simple/client/ChangeLog b/src/appl/simple/client/ChangeLog index 275d42bf2..db1136c43 100644 --- a/src/appl/simple/client/ChangeLog +++ b/src/appl/simple/client/ChangeLog @@ -1,3 +1,8 @@ +Fri Nov 22 15:48:30 1996 unknown + + * sim_client.c (main): use sizeof instead of h_length to determine + number of bytes of addr to copy from DNS response [krb5-misc/211] + Thu Nov 7 15:26:10 1996 Theodore Ts'o * sim_client.c (main): Check the error return from diff --git a/src/appl/simple/client/sim_client.c b/src/appl/simple/client/sim_client.c index 9def2603c..a573dfa54 100644 --- a/src/appl/simple/client/sim_client.c +++ b/src/appl/simple/client/sim_client.c @@ -163,7 +163,7 @@ main(argc, argv) /* Set server's address */ (void) memset((char *)&s_sock, 0, sizeof(s_sock)); - memcpy((char *)&s_sock.sin_addr, host->h_addr, host->h_length); + memcpy((char *)&s_sock.sin_addr, host->h_addr, sizeof(s_sock.sin_addr)); #ifdef DEBUG printf("s_sock.sin_addr is %s\n", inet_ntoa(s_sock.sin_addr)); #endif @@ -198,7 +198,7 @@ main(argc, argv) fprintf(stderr, "%s: unknown host\n", hostname); exit(1); } - memcpy((char *)&c_sock.sin_addr, host->h_addr, host->h_length); + memcpy((char *)&c_sock.sin_addr, host->h_addr, sizeof(c_sock.sin_addr)); #endif diff --git a/src/appl/simple/server/ChangeLog b/src/appl/simple/server/ChangeLog index 58042da37..6e30ce4a4 100644 --- a/src/appl/simple/server/ChangeLog +++ b/src/appl/simple/server/ChangeLog @@ -1,3 +1,8 @@ +Fri Nov 22 15:48:42 1996 unknown + + * sim_server.c (argv): use sizeof instead of h_length to determine + number of bytes of addr to copy from DNS response [krb5-misc/211] + Thu Nov 7 15:26:44 1996 Theodore Ts'o * sim_server.c (argv): Check the error return from diff --git a/src/appl/simple/server/sim_server.c b/src/appl/simple/server/sim_server.c index 551a4f36c..255d786f2 100644 --- a/src/appl/simple/server/sim_server.c +++ b/src/appl/simple/server/sim_server.c @@ -151,7 +151,7 @@ char *argv[]; fprintf(stderr, "%s: host unknown\n", full_hname); exit(1); } - memcpy((char *)&s_sock.sin_addr, host->h_addr, host->h_length); + memcpy((char *)&s_sock.sin_addr, host->h_addr, sizeof(s_sock.sin_addr)); /* Open socket */ if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { diff --git a/src/appl/telnet/libtelnet/ChangeLog b/src/appl/telnet/libtelnet/ChangeLog index 38d231440..13db0e545 100644 --- a/src/appl/telnet/libtelnet/ChangeLog +++ b/src/appl/telnet/libtelnet/ChangeLog @@ -1,3 +1,11 @@ +Thu Nov 20 17:13:42 1997 Tom Yu + + * forward.c (rd_and_store_for_creds): Fix up to no longer do the + chown [krb5-appl/502] + + * kerberos5.c (kerberos5_is): Fix up call to + rd_and_store_for_creds. [krb5-appl/502] + Thu Nov 7 15:29:09 1996 Theodore Ts'o * kerberos5.c (kerberos5_init): Check the error return from diff --git a/src/appl/telnet/libtelnet/forward.c b/src/appl/telnet/libtelnet/forward.c index a0ea5b34f..2d13067ef 100644 --- a/src/appl/telnet/libtelnet/forward.c +++ b/src/appl/telnet/libtelnet/forward.c @@ -25,7 +25,6 @@ #if defined(KERBEROS) || defined(KRB5) #include -#include #include #include "k5-int.h" @@ -34,23 +33,18 @@ extern char *line; /* see sys_term.c */ /* Decode, decrypt and store the forwarded creds in the local ccache. */ krb5_error_code -rd_and_store_for_creds(context, auth_context, inbuf, ticket, lusername) +rd_and_store_for_creds(context, auth_context, inbuf, ticket) krb5_context context; krb5_auth_context auth_context; krb5_data *inbuf; krb5_ticket *ticket; - char *lusername; { krb5_creds **creds; krb5_error_code retval; char ccname[35]; krb5_ccache ccache = NULL; - struct passwd *pwd; char *tty; - if (!(pwd = (struct passwd *) getpwnam(lusername))) - return -1; - if (retval = krb5_rd_cred(context, auth_context, inbuf, &creds, NULL)) return(retval); @@ -66,9 +60,6 @@ rd_and_store_for_creds(context, auth_context, inbuf, ticket, lusername) if (retval = krb5_cc_store_cred(context, ccache, *creds)) goto cleanup; - if (retval = chown(ccname+5, pwd->pw_uid, -1)) - goto cleanup; - cleanup: krb5_free_creds(context, *creds); return retval; diff --git a/src/appl/telnet/libtelnet/kerberos5.c b/src/appl/telnet/libtelnet/kerberos5.c index 53d381662..06052d390 100644 --- a/src/appl/telnet/libtelnet/kerberos5.c +++ b/src/appl/telnet/libtelnet/kerberos5.c @@ -529,7 +529,7 @@ kerberos5_is(ap, data, cnt) if ((r = krb5_auth_con_genaddrs(telnet_context, auth_context, net, KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR)) || (r = rd_and_store_for_creds(telnet_context, auth_context, - &inbuf, ticket, UserNameRequested))) { + &inbuf, ticket))) { char errbuf[128]; diff --git a/src/appl/telnet/telnet/ChangeLog b/src/appl/telnet/telnet/ChangeLog index 8080dba47..f58e8955f 100644 --- a/src/appl/telnet/telnet/ChangeLog +++ b/src/appl/telnet/telnet/ChangeLog @@ -1,3 +1,25 @@ +Tue Nov 26 20:41:31 1996 Tom Yu + + * configure.in: Check for apra/inet.h + + * commands.c: Remove explicit declaration of inet_addr, and + declare INADDR_NONE to be 0xffffffff again, but mask off the lower + 32 bits while doing the compare. + +Sat Nov 23 00:33:58 1996 Sam Hartman + + * commands.c (tn): Patch from mycroft@mit.edu for Alpha NetBSD. + Comparing to -1 is not 64-bit clean. + [233] + (INADDR_NONE): Mycroft suggests using -1 not 0xffffffff if I have + to define it ourselves. [233] + + Fri Nov 22 15:48:57 1996 unknown + + * commands.c (sourceroute): use sizeof instead of h_length to + determine number of bytes of addr to copy from DNS response + [krb5-misc/211] + Thu Nov 14 14:25:51 1996 Theodore Ts'o * sys_bsd.c(intr): Added checks to intr_waiting and intr_happened diff --git a/src/appl/telnet/telnet/commands.c b/src/appl/telnet/telnet/commands.c index cfd975e2f..0b42efe62 100644 --- a/src/appl/telnet/telnet/commands.c +++ b/src/appl/telnet/telnet/commands.c @@ -44,6 +44,9 @@ #endif /* defined(unix) */ #include #include +#ifdef HAVE_ARPA_INET_H +#include +#endif /* HAVE_ARPA_INET_H */ #ifdef CRAY #include #endif /* CRAY */ @@ -89,6 +92,9 @@ #ifndef MAXDNAME #define MAXDNAME 256 /*per the rfc*/ #endif +#ifndef INADDR_NONE +#define INADDR_NONE 0xffffffff +#endif #if defined(IPPROTO_IP) && defined(IP_TOS) int tos = -1; @@ -2352,8 +2358,6 @@ ayt_status() } #endif -unsigned long inet_addr(); - int tn(argc, argv) int argc; @@ -2443,10 +2447,10 @@ tn(argc, argv) } else { #endif temp = inet_addr(hostp); - if (temp != (unsigned long) -1) { + if (temp & 0xffffffff != INADDR_NONE) { sin.sin_addr.s_addr = temp; sin.sin_family = AF_INET; - (void) strcpy(_hostname, hostp); + (void) strcpy(_hostname, hostp); hostname = _hostname; } else { host = gethostbyname(hostp); @@ -2454,9 +2458,10 @@ tn(argc, argv) sin.sin_family = host->h_addrtype; #if defined(h_addr) /* In 4.3, this is a #define */ memcpy((caddr_t)&sin.sin_addr, - host->h_addr_list[0], host->h_length); + host->h_addr_list[0], sizeof(sin.sin_addr)); #else /* defined(h_addr) */ - memcpy((caddr_t)&sin.sin_addr, host->h_addr, host->h_length); + memcpy((caddr_t)&sin.sin_addr, host->h_addr, + sizeof(sin.sin_addr)); #endif /* defined(h_addr) */ strncpy(_hostname, host->h_name, sizeof(_hostname)); _hostname[sizeof(_hostname)-1] = '\0'; @@ -2546,9 +2551,9 @@ tn(argc, argv) perror((char *)0); host->h_addr_list++; memcpy((caddr_t)&sin.sin_addr, - host->h_addr_list[0], host->h_length); + host->h_addr_list[0], sizeof(sin.sin_addr)); memcpy((caddr_t)&hostaddr, - host->h_addr_list[0], host->h_length); + host->h_addr_list[0], sizeof(sin.sin_addr)); (void) NetClose(net); continue; } @@ -3055,9 +3060,10 @@ sourceroute(arg, cpp, lenp) } else if (host = gethostbyname(cp)) { #if defined(h_addr) memcpy((caddr_t)&sin_addr, - host->h_addr_list[0], host->h_length); + host->h_addr_list[0], sizeof(sin_addr)); #else - memcpy((caddr_t)&sin_addr, host->h_addr, host->h_length); + memcpy((caddr_t)&sin_addr, host->h_addr, + sizeof(sin_addr)); #endif } else { *cpp = cp; diff --git a/src/appl/telnet/telnet/configure.in b/src/appl/telnet/telnet/configure.in index 619153f03..3d08e2f4a 100644 --- a/src/appl/telnet/telnet/configure.in +++ b/src/appl/telnet/telnet/configure.in @@ -3,7 +3,7 @@ CONFIG_RULES AC_PROG_INSTALL AC_VFORK AC_CHECK_HEADERS(string.h arpa/nameser.h) -AC_HAVE_HEADERS(unistd.h sys/select.h stdlib.h) +AC_HAVE_HEADERS(unistd.h sys/select.h stdlib.h arpa/inet.h) AC_CHECK_LIB(termcap,main,AC_DEFINE(TERMCAP) LIBS="$LIBS -ltermcap", AC_CHECK_LIB(curses,setupterm,LIBS="$LIBS -lcurses") diff --git a/src/appl/telnet/telnetd/ChangeLog b/src/appl/telnet/telnetd/ChangeLog index f537d119e..3545edf33 100644 --- a/src/appl/telnet/telnetd/ChangeLog +++ b/src/appl/telnet/telnetd/ChangeLog @@ -1,3 +1,32 @@ +Wed Jan 28 17:21:08 1998 Dan Winship + + * telnetd.c (doit): additional fix for previous terminaltype change + +Tue Jan 27 18:27:16 1998 Dan Winship + + * telnetd.c (getterminaltype): Null-terminate strings and avoid a + buffer overrun. + + * ext.h: make terminaltype a char[] instead of a char * for + telnetd.c change + + * state.c (suboption): redo handling of terminaltype + +Thu Dec 4 21:32:37 1997 Tom Yu + + * telnetd.c (doit): Fix up slave buffer length. + +Thu Oct 23 13:59:32 1997 Theodore Y. Ts'o + + * state.c (envvarok): Prohibit the passing of TERMCAP, TERMPATH, + TERMINFO, and HOME, since they can be used to exploit a + security in tgetent. + +Wed Apr 9 23:46:40 1997 Tom Yu + + * sys_term.c (start_login): Bounds check the constructed "speed" + passed in to login. + Thu Nov 7 15:32:06 1996 Theodore Ts'o * telnetd.c (main): Check the error return from diff --git a/src/appl/telnet/telnetd/ext.h b/src/appl/telnet/telnetd/ext.h index 37e2a1970..1e4963cf8 100644 --- a/src/appl/telnet/telnetd/ext.h +++ b/src/appl/telnet/telnetd/ext.h @@ -66,7 +66,7 @@ extern int auth_level; extern int auth_negotiated; /* Have we finished all authentication negotiation we plan to finish?*/ extern slcfun slctab[NSLC + 1]; /* slc mapping table */ -extern char *terminaltype; +extern char terminaltype[41]; /* * I/O data buffers, pointers, and counters. diff --git a/src/appl/telnet/telnetd/state.c b/src/appl/telnet/telnetd/state.c index 16e71d470..afca74c97 100644 --- a/src/appl/telnet/telnetd/state.c +++ b/src/appl/telnet/telnetd/state.c @@ -1140,7 +1140,7 @@ suboption() } /* end of case TELOPT_TSPEED */ case TELOPT_TTYPE: { /* Yaaaay! */ - static char terminalname[41]; + char *tt; if (his_state_is_wont(TELOPT_TTYPE)) /* Ignore if option disabled */ break; @@ -1151,20 +1151,18 @@ suboption() return; /* ??? XXX but, this is the most robust */ } - terminaltype = terminalname; + tt = terminaltype; - while ((terminaltype < (terminalname + sizeof terminalname-1)) && - !SB_EOF()) { + while ((tt < (terminaltype + sizeof(terminaltype) - 1)) && !SB_EOF()) { register int c; c = SB_GET(); if (isupper(c)) { c = tolower(c); } - *terminaltype++ = c; /* accumulate name */ + *tt++ = c; /* accumulate name */ } - *terminaltype = 0; - terminaltype = terminalname; + *tt = 0; break; } /* end of case TELOPT_TTYPE */ @@ -1645,6 +1643,10 @@ static int envvarok(varp) char *varp; { if (!strchr(varp, '=') && + strcmp(varp, "TERMCAP") && /* to prevent a security hole */ + strcmp(varp, "TERMINFO") && /* with tgetent */ + strcmp(varp, "TERMPATH") && + strcmp(varp, "HOME") && /* to prevent the tegetent bug */ strncmp(varp, "LD_", strlen("LD_")) && /* most systems */ strncmp(varp, "_RLD_", strlen("_RLD_")) && /* irix */ strncmp(varp, "KRB5", strlen("KRB5")) && /* v5 */ diff --git a/src/appl/telnet/telnetd/sys_term.c b/src/appl/telnet/telnetd/sys_term.c index a7c7ee526..0e5def6b0 100644 --- a/src/appl/telnet/telnetd/sys_term.c +++ b/src/appl/telnet/telnetd/sys_term.c @@ -1289,7 +1289,7 @@ start_login(host, autologin, name) if (pty > 2) { register char *cp; - char speed[128]; + char speed[1024]; int isecho, israw, xpty, len; extern int def_rspeed; # ifndef LOGIN_HOST @@ -1326,7 +1326,13 @@ start_login(host, autologin, name) len = strlen(name)+1; write(xpty, name, len); write(xpty, name, len); - sprintf(speed, "%s/%d", (cp = getenv("TERM")) ? cp : "", + memset(speed, 0, sizeof(speed)); + strncpy(speed, + (cp = getenv("TERM")) ? cp : "", + sizeof(speed)-1-(10*sizeof(def_rspeed)/4)-1); + /* 1 for /, () for the number, 1 for trailing 0. */ + sprintf(speed + strlen(speed), + "/%d", (def_rspeed > 0) ? def_rspeed : 9600); len = strlen(speed)+1; write(xpty, speed, len); diff --git a/src/appl/telnet/telnetd/telnetd.c b/src/appl/telnet/telnetd/telnetd.c index 0c6171297..32a6bf82b 100644 --- a/src/appl/telnet/telnetd/telnetd.c +++ b/src/appl/telnet/telnetd/telnetd.c @@ -779,12 +779,14 @@ getterminaltype(name) * we have to just go with what we (might) have already gotten. */ if (his_state_is_will(TELOPT_TTYPE) && !terminaltypeok(terminaltype)) { - (void) strncpy(first, terminaltype, sizeof(first)); + (void) strncpy(first, terminaltype, sizeof(first) - 1); + first[sizeof(first) - 1] = '\0'; for(;;) { /* * Save the unknown name, and request the next name. */ - (void) strncpy(last, terminaltype, sizeof(last)); + (void) strncpy(last, terminaltype, sizeof(last) - 1); + last[sizeof(last) - 1] = '\0'; _gettermname(); if (terminaltypeok(terminaltype)) break; @@ -801,9 +803,12 @@ getterminaltype(name) * RFC1091 compliant telnets will cycle back to * the start of the list. */ - _gettermname(); - if (strncmp(first, terminaltype, sizeof(first)) != 0) - (void) strncpy(terminaltype, first, sizeof(first)); + _gettermname(); + if (strncmp(first, terminaltype, sizeof(first)) != 0) { + (void) strncpy(terminaltype, first, + sizeof(terminaltype) - 1); + terminaltype[sizeof(terminaltype) - 1] = '\0'; + } break; } } @@ -835,7 +840,7 @@ terminaltypeok(s) { char buf[1024]; - if (terminaltype == NULL) + if (!*s) return(1); /* @@ -885,11 +890,9 @@ long retval; pty_init(); - if ((retval = pty_getpty(&pty, line, 20)) != 0 ) - { + if ((retval = pty_getpty(&pty, line, 17)) != 0) { fatal(net, error_message(retval)); - } - + } #if defined(_SC_CRAY_SECURE_SYS) /* @@ -949,7 +952,7 @@ pty_init(); */ *user_name = 0; level = getterminaltype(user_name); - setenv("TERM", terminaltype ? terminaltype : "network", 1); + setenv("TERM", *terminaltype ? terminaltype : "network", 1); /* * Start up the login process on the slave side of the terminal diff --git a/src/appl/user_user/ChangeLog b/src/appl/user_user/ChangeLog index 62651d0cb..e00507592 100644 --- a/src/appl/user_user/ChangeLog +++ b/src/appl/user_user/ChangeLog @@ -1,3 +1,8 @@ +Fri Nov 22 15:49:09 1996 unknown + + * client.c (argv): use sizeof instead of h_length to determine + number of bytes of addr to copy from DNS response [krb5-misc/211] + Thu Nov 7 15:36:15 1996 Theodore Ts'o * client.c (argv): diff --git a/src/appl/user_user/client.c b/src/appl/user_user/client.c index 4bee7089c..2cf85ae94 100644 --- a/src/appl/user_user/client.c +++ b/src/appl/user_user/client.c @@ -128,7 +128,8 @@ char *argv[]; fprintf (stderr, "uu-client: unable to connect to \"%s\"\n", hname); return 5; } - memcpy ((char *)&serv_net_addr.sin_addr, host->h_addr_list[i++], host->h_length); + memcpy ((char *)&serv_net_addr.sin_addr, host->h_addr_list[i++], + sizeof(serv_net_addr.sin_addr)); if (connect(s, (struct sockaddr *)&serv_net_addr, sizeof (serv_net_addr)) == 0) break; com_err ("uu-client", errno, "connecting to \"%s\" (%s).", diff --git a/src/clients/kinit/ChangeLog b/src/clients/kinit/ChangeLog index c3bbbeb3f..f3d8f2d3f 100644 --- a/src/clients/kinit/ChangeLog +++ b/src/clients/kinit/ChangeLog @@ -1,3 +1,7 @@ +Thu Dec 5 21:59:08 1996 Tom Yu + + * kinit.M: v5srvtab -> krb5.keytab [279] + Wed Nov 6 09:31:35 1996 Theodore Y. Ts'o * kinit.c (main): Check the return code from krb5_init_context, diff --git a/src/clients/kinit/kinit.M b/src/clients/kinit/kinit.M index 86465b9a0..6681967f4 100644 --- a/src/clients/kinit/kinit.M +++ b/src/clients/kinit/kinit.M @@ -130,7 +130,7 @@ Location of the credentials (ticket) cache. /tmp/krb5cc_[uid] default credentials cache ([uid] is the decimal UID of the user). .TP -/etc/v5srvtab +/etc/krb5.keytab default location for the local host's .B keytab file. diff --git a/src/clients/klist/ChangeLog b/src/clients/klist/ChangeLog index 8b0051b4c..f72ff09cd 100644 --- a/src/clients/klist/ChangeLog +++ b/src/clients/klist/ChangeLog @@ -1,3 +1,7 @@ +Thu Dec 5 21:59:34 1996 Tom Yu + + * klist.M: v5srvtab -> krb5.keytab [279] + Wed Nov 6 12:02:59 1996 Theodore Ts'o * klist.c (main): Check the error return from krb5_init_context(), diff --git a/src/clients/klist/klist.M b/src/clients/klist/klist.M index acf80ab46..99b42b985 100644 --- a/src/clients/klist/klist.M +++ b/src/clients/klist/klist.M @@ -107,7 +107,7 @@ Location of the credentials (ticket) cache. default location of the credentials cache ([uid] is the decimal UID of the user). .TP -/etc/v5srvtab +/etc/krb5.keytab default location of the .B keytab file. diff --git a/src/clients/ksu/ChangeLog b/src/clients/ksu/ChangeLog index 0de61a45b..ffb79933b 100644 --- a/src/clients/ksu/ChangeLog +++ b/src/clients/ksu/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 4 20:46:49 1998 Tom Yu + + * krb_auth_su.c (krb5_verify_tkt_def): If using a pre-existing + credential cache, ensure that the host ticket has not yet + expired. Patch from vwelch@ncsa.uiuc.edu [krb5-clients/545]. + Sun Nov 10 20:10:53 1996 Sam Hartman * krb_auth_su.c (path_passwd;): If you don't have a srvtab, always diff --git a/src/clients/ksu/krb_auth_su.c b/src/clients/ksu/krb_auth_su.c index b089fa113..e5a489f91 100644 --- a/src/clients/ksu/krb_auth_su.c +++ b/src/clients/ksu/krb_auth_su.c @@ -341,7 +341,17 @@ krb5_keyblock * tkt_ses_key; return(retval); } - + /* Check to make sure ticket hasn't expired */ + if (retval = krb5_check_exp(context, tkt->enc_part2->times)) { + if (auth_debug && (retval == KRB5KRB_AP_ERR_TKT_EXPIRED)) { + fprintf(stderr, + "krb5_verify_tkt_def: ticket has expired"); + } + krb5_free_ticket(context, tkt); + krb5_kt_free_entry(context, &ktentry); + krb5_free_keyblock(context, tkt_key); + return KRB5KRB_AP_ERR_TKT_EXPIRED; + } if (!krb5_principal_compare(context, client, tkt->enc_part2->client)) { krb5_free_ticket(context, tkt); diff --git a/src/config-files/ChangeLog b/src/config-files/ChangeLog index 26edc4478..fd73b3e5e 100644 --- a/src/config-files/ChangeLog +++ b/src/config-files/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 26 19:24:34 1996 Theodore Y. Ts'o + + * kdc.conf: Fixed paths to use the GNU standard conventions. + [PR#246] + Thu Nov 14 23:08:37 1996 Tom Yu * krb5.conf.M: Note change in default_keytab_name. diff --git a/src/config-files/kdc.conf b/src/config-files/kdc.conf index c9856691d..cf8cbe1fd 100644 --- a/src/config-files/kdc.conf +++ b/src/config-files/kdc.conf @@ -3,10 +3,10 @@ [realms] ATHENA.MIT.EDU = { - database_name = /usr/local/lib/krb5kdc/principal - admin_keytab = FILE:/usr/local/lib/krb5kdc/kadm5.keytab - acl_file = /usr/local/lib/krb5kdc/kadm5.acl - key_stash_file = /usr/local/lib/krb5kdc/.k5stash + database_name = /usr/local/var/krb5kdc/principal + admin_keytab = FILE:/usr/local/var/krb5kdc/kadm5.keytab + acl_file = /usr/local/var/krb5kdc/kadm5.acl + key_stash_file = /usr/local/var/krb5kdc/.k5.ATHENA.MIT.EDU kdc_ports = 750,88 max_life = 10h 0m 0s max_renewable_life = 7d 0h 0m 0s diff --git a/src/config/ChangeLog b/src/config/ChangeLog index a1a776c95..c52323cd7 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,3 +1,8 @@ +Tue Apr 8 11:09:20 1997 Theodore Ts'o + + * post.in: Fix recursion rule to make bash 2.x happy. + [krb5-build/403] (for patchlevel 1) + Mon Nov 11 20:53:01 1996 Tom Yu * pre.in (DEJAFLAGS): Change gmake-dependent $(shell uname foo) to diff --git a/src/config/post.in b/src/config/post.in index 277f92b45..6dcb86552 100644 --- a/src/config/post.in +++ b/src/config/post.in @@ -63,5 +63,5 @@ all-recurse clean-recurse install-recurse check-recurse Makefiles-recurse: else $$e; fi; \ else \ echo "Skipping missing directory $(CURRENT_DIR)$$i" ; \ - fi \ + fi; \ done diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 3a2976d58..8ff29d5b0 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,8 @@ +Sat Nov 23 00:16:46 1996 Theodore Ts'o + + * k5-int.h: Remove DES3 and SHA support, since what's there isn't + fully correct. [PR#231] + Wed Nov 13 14:28:08 1996 Tom Yu * k5-int.h, krb5.hin: Revert kt_default_name changes. diff --git a/src/include/k5-int.h b/src/include/k5-int.h index f6f30ef5c..02cb5c22f 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -145,12 +145,12 @@ #define PROVIDE_DES_CBC_CRC #define PROVIDE_DES_CBC_RAW #define PROVIDE_DES_CBC_CKSUM -#define PROVIDE_DES3_CBC_SHA -#define PROVIDE_DES3_CBC_RAW +/* #define PROVIDE_DES3_CBC_SHA */ +/* #define PROVIDE_DES3_CBC_RAW */ #define PROVIDE_CRC32 #define PROVIDE_RSA_MD4 #define PROVIDE_RSA_MD5 -#define PROVIDE_NIST_SHA +/* #define PROVIDE_NIST_SHA */ #ifndef _SIZE_T_DEFINED typedef unsigned int size_t; diff --git a/src/include/kerberosIV/ChangeLog b/src/include/kerberosIV/ChangeLog index 74755254d..694a6186b 100644 --- a/src/include/kerberosIV/ChangeLog +++ b/src/include/kerberosIV/ChangeLog @@ -1,3 +1,7 @@ +Fri Nov 22 11:34:46 1996 Sam Hartman + + * Makefile.in: Install krb_err.h [218] + Thu Oct 31 17:27:08 1996 Sam Hartman * Makefile.in (install): Start installing headers again [36] diff --git a/src/include/kerberosIV/Makefile.in b/src/include/kerberosIV/Makefile.in index 669e341c1..0e4705ff2 100644 --- a/src/include/kerberosIV/Makefile.in +++ b/src/include/kerberosIV/Makefile.in @@ -1,4 +1,5 @@ -KRB4_HEADERS=krb.h des.h kadm.h mit-copyright.h +KRB4_HEADERS=krb.h des.h kadm.h mit-copyright.h \ + krb_err.h all:: diff --git a/src/include/krb5/k5-config.h b/src/include/krb5/k5-config.h deleted file mode 100644 index 9d2ec6c18..000000000 --- a/src/include/krb5/k5-config.h +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright 1990,1991,1994,1995 by the Massachusetts Institute of Technology. - * 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 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. - * - * Configuration definition file. - */ - - -#ifndef KRB5_CONFIG__ -#define KRB5_CONFIG__ - -#ifdef _MSDOS -/* - * Machine-type definitions: PC Clone 386 running Microloss Windows - */ - -/* Kerberos Windows initialization file */ -#define KERBEROS_INI "kerberos.ini" -#define INI_FILES "Files" -#define INI_KRB_CCACHE "krb5cc" /* Location of the ccache */ -#define INI_KRB5_CONF "krb5.ini" /* Location of krb5.conf file */ - -#define KRB5_DBM_COMPAT__ /* Don't load dbm.h */ -#define KRB5_KDB5__ /* Don't load kdb.h */ -#define KRB5_KDB5_DBM__ /* Don't load kdb_dbm.h */ - -#define BITS16 -#define SIZEOF_INT 2 -#define SIZEOF_SHORT 2 -#define SIZEOF_LONG 4 -#define MAXHOSTNAMELEN 512 -#define MAXPATHLEN 256 /* Also for Windows temp files */ - -#define KRB5_USE_INET -#define MSDOS_FILESYSTEM -#define USE_STRING_H -#define HAVE_SRAND -#define HAVE_ERRNO -#define HAS_STRDUP -#define NO_USERID -#define NOFCHMOD -#define NOCHMOD -#define NO_PASSWORD -#define WM_KERBEROS5_CHANGED "Kerberos5 Changed" - -#define HAS_ANSI_VOLATILE -#define HAS_VOID_TYPE -#define KRB5_PROVIDE_PROTOTYPES -#define HAVE_STDARG_H -#define HAVE_SYS_TYPES_H - -#ifndef _SIZE_T_DEFINED -typedef unsigned int size_t; -#define _SIZE_T_DEFINED -#endif - -#ifndef KRB5_SYSTYPES__ -#define KRB5_SYSTYPES__ -#include -typedef unsigned long u_long; /* Not part of sys/types.h on the pc */ -typedef unsigned int u_int; -typedef unsigned short u_short; -typedef unsigned char u_char; -#endif /* KRB5_SYSTYPES__ */ - -#ifndef INTERFACE -#define INTERFACE __far __export __pascal -#define INTERFACE_C __far __export __cdecl -#endif - -/* - * The following defines are needed to make work - * in stdc mode (/Za flag). Winsock.h needs . - */ -#define FAR _far -#define NEAR _near -#define _far __far -#define _near __near -#define _pascal __pascal -#define _cdecl __cdecl -#define _huge __huge - -#ifdef NEED_WINDOWS -#include -#endif - -#ifdef NEED_LOWLEVEL_IO -/* Ugly. Microsoft, in stdc mode, doesn't support the low-level i/o - * routines directly. Rather, they only export the _ version. - * The following defines works around this problem. - */ -#include -#include -#include -#include -#include -#define O_RDONLY _O_RDONLY -#define O_WRONLY _O_WRONLY -#define O_RDWR _O_RDWR -#define O_APPEND _O_APPEND -#define O_CREAT _O_CREAT -#define O_TRUNC _O_TRUNC -#define O_EXCL _O_EXCL -#define O_TEXT _O_TEXT -#define O_BINARY _O_BINARY -#define O_NOINHERIT _O_NOINHERIT -#define stat _stat -#define unlink _unlink -#define lseek _lseek -#define write _write -#define open _open -#define close _close -#define read _read -#define fstat _fstat -#define mktemp _mktemp -#define dup _dup - -#define getpid _getpid -#endif - -#ifdef NEED_SYSERROR -/* Only needed by util/et/error_message.c but let's keep the source clean */ -#define sys_nerr _sys_nerr -#define sys_errlist _sys_errlist -#endif - -/* XXX these should be parameterized soon... */ -#define PROVIDE_DES_CBC_MD5 -#define PROVIDE_DES_CBC_CRC -#define PROVIDE_RAW_DES_CBC -#define PROVIDE_CRC32 -#define PROVIDE_DES_CBC_CKSUM -#define PROVIDE_RSA_MD4 -#define PROVIDE_RSA_MD5 -#define DEFAULT_PWD_STRING1 "Enter password:" -#define DEFAULT_PWD_STRING2 "Re-enter password for verification:" - -/* Functions with slightly different names on the PC -*/ -#define strcasecmp _stricmp -#define strdup _strdup -#define off_t _off_t - -#else /* Rest of include file is for non-Microloss-Windows */ - -#if defined(_MACINTOSH) -#include - -typedef struct { - int dummy; -} datum; - -#include - -#ifdef NEED_LOWLEVEL_IO -#include -#endif - -#ifndef _MWERKS -/* there is no for mpw */ -typedef unsigned long mode_t; -typedef unsigned long ino_t; -typedef unsigned long dev_t; -typedef short nlink_t; -typedef unsigned long uid_t; -typedef unsigned long gid_t; -typedef long off_t; -struct stat -{ - mode_t st_mode; /* File mode; see #define's below */ - ino_t st_ino; /* File serial number */ - dev_t st_dev; /* ID of device containing this file */ - nlink_t st_nlink; /* Number of links */ - uid_t st_uid; /* User ID of the file's owner */ - gid_t st_gid; /* Group ID of the file's group */ - dev_t st_rdev; /* Device type */ - off_t st_size; /* File size in bytes */ - unsigned long st_atime; /* Time of last access */ - unsigned long st_mtime; /* Time of last data modification */ - unsigned long st_ctime; /* Time of last file status change */ - long st_blksize; /* Optimal blocksize */ - long st_blocks; /* blocks allocated for file */ -}; - -int stat(const char *path, struct stat *buf); -int fstat(int fildes, struct stat *buf); - -#endif /* _MWERKS */ - -#define EFBIG 1000 - -#define NOFCHMOD 1 -#define NOCHMOD 1 -#define _MACSOCKAPI_ - -#define THREEPARAMOPEN(x,y,z) open(x,y) -#define MAXPATHLEN 255 - -/* protocol families same as address families */ -#define PF_INET AF_INET - -/* XXX these should be parameterized soon... */ -#define PROVIDE_DES_CBC_MD5 -#define PROVIDE_DES_CBC_CRC -#define PROVIDE_RAW_DES_CBC -#define PROVIDE_CRC32 -#define PROVIDE_DES_CBC_CKSUM -#define PROVIDE_RSA_MD4 -#define PROVIDE_RSA_MD5 - -#else /* _MACINTOSH */ -#define THREEPARAMOPEN(x,y,z) open(x,y,z) -#endif /* _MACINTOSH */ - -#ifndef KRB5_AUTOCONF__ -#define KRB5_AUTOCONF__ -#include "autoconf.h" -#endif - -#ifndef KRB5_SYSTYPES__ -#define KRB5_SYSTYPES__ - -#ifdef HAVE_SYS_TYPES_H /* From autoconf.h */ -#include -#else /* HAVE_SYS_TYPES_H */ -typedef unsigned long u_long; -typedef unsigned int u_int; -typedef unsigned short u_short; -typedef unsigned char u_char; -#endif /* HAVE_SYS_TYPES_H */ -#endif /* KRB5_SYSTYPES__ */ - -#ifdef SYSV -/* Change srandom and random to use rand and srand */ -/* Taken from the Sandia changes. XXX We should really just include */ -/* srandom and random into Kerberos release, since rand() is a really */ -/* bad random number generator.... [tytso:19920616.2231EDT] */ -#define random() rand() -#define srandom(a) srand(a) -#ifndef unicos61 -#define utimes(a,b) utime(a,b) -#endif /* unicos61 */ -#endif /* SYSV */ - -/* XXX these should be parameterized soon... */ -#define PROVIDE_DES_CBC_MD5 -#define PROVIDE_DES_CBC_CRC -#define PROVIDE_RAW_DES_CBC -#define PROVIDE_CRC32 -#define PROVIDE_DES_CBC_CKSUM -#define PROVIDE_RSA_MD4 -#define PROVIDE_RSA_MD5 - -#define DEFAULT_PWD_STRING1 "Enter password:" -#define DEFAULT_PWD_STRING2 "Re-enter password for verification:" - -#define KRB5_KDB_MAX_LIFE (60*60*24) /* one day */ -#define KRB5_KDB_MAX_RLIFE (60*60*24*7) /* one week */ -#define KRB5_KDB_EXPIRATION 2145830400 /* Thu Jan 1 00:00:00 2038 UTC */ - -/* - * For paranoid DOE types that don't want to give helpful error - * messages to the client....er, attacker - */ -#undef KRBCONF_VAGUE_ERRORS - -/* - * Define this if you want the KDC to modify the Kerberos database; - * this allows the last request information to be updated, as well as - * the failure count information. - * - * Note that this doesn't work if you're using slave servers!!! It - * also causes the database to be modified (and thus need to be - * locked) frequently. - */ -#undef KRBCONF_KDC_MODIFIES_KDB - -/* - * Windows requires a different api interface to each function. Here - * just define it as NULL. - */ -#define INTERFACE -#define INTERFACE_C -#define FAR -#define NEAR -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -#ifndef HAS_LABS -#define labs(x) abs(x) -#endif - -#endif /* _MSDOS */ -#endif /* KRB5_CONFIG__ */ diff --git a/src/kadmin.v4/server/ChangeLog b/src/kadmin.v4/server/ChangeLog index 1bb368af3..b411bb8a1 100644 --- a/src/kadmin.v4/server/ChangeLog +++ b/src/kadmin.v4/server/ChangeLog @@ -1,3 +1,9 @@ +Fri Nov 22 15:49:35 1996 unknown + + * kadm_ser_wrap.c (kadm_ser_init): use sizeof instead of h_length + to determine number of bytes of addr to copy from DNS response + [krb5-misc/211] + Thu Jun 13 22:09:02 1996 Tom Yu * configure.in: remove ref to ET_RULES diff --git a/src/kadmin.v4/server/kadm_ser_wrap.c b/src/kadmin.v4/server/kadm_ser_wrap.c index 7c373b3d6..bc8f0b5de 100644 --- a/src/kadmin.v4/server/kadm_ser_wrap.c +++ b/src/kadmin.v4/server/kadm_ser_wrap.c @@ -72,7 +72,7 @@ kadm_ser_init(inter, realm) if ((hp = gethostbyname(hostname)) == NULL) return KADM_NO_HOSTNAME; memcpy((char *) &server_parm.admin_addr.sin_addr.s_addr, hp->h_addr, - hp->h_length); + sizeof(server_parm.admin_addr.sin_addr.s_addr)); server_parm.admin_addr.sin_port = sep->s_port; /* setting up the database */ mkey_name = KRB5_KDB_M_NAME; diff --git a/src/kadmin/cli/ChangeLog b/src/kadmin/cli/ChangeLog index d06ca6e98..bcdb670d5 100644 --- a/src/kadmin/cli/ChangeLog +++ b/src/kadmin/cli/ChangeLog @@ -1,3 +1,13 @@ +Thu Dec 5 19:30:22 1996 Tom Yu + + * kadmin.M: Missed a ref to /krb5. [279] + + * kadmin.M: Change example to no longer use /krb5. [PR 279] + + * kadmin.M: v5srvtab -> krb5.keytab [PR 279] + + * kadmin.c (DEFAULT_KEYTAB): v5srvtab -> krb5.keytab [PR 278] + Wed Nov 13 14:29:02 1996 Tom Yu * Makefile.in (clean-unix): Remove getdate.c and kadmin_ct.c. diff --git a/src/kadmin/cli/kadmin.M b/src/kadmin/cli/kadmin.M index f0f8913f1..a74874ff9 100644 --- a/src/kadmin/cli/kadmin.M +++ b/src/kadmin/cli/kadmin.M @@ -676,7 +676,7 @@ is added, ignoring multiple keys with the same encryption type but different salt types. If the .B \-k argument is not specified, the default keytab -.I /etc/v5srvtab +.I /etc/krb5.keytab is used. If the .B \-q option is specified, less verbose status information is displayed. @@ -695,13 +695,10 @@ command. .RS .TP EXAMPLE: -kadmin: ktadd -k /krb5/kadmind.keytab kadmin/admin kadmin/changepw -Entry for principal kadmin/admin@ATHENA.MIT.EDU with +kadmin: ktadd -k /tmp/foo-new-keytab host/foo.mit.edu +Entry for principal host/foo.mit.edu@ATHENA.MIT.EDU with kvno 3, encryption type DES-CBC-CRC added to keytab - WRFILE:/krb5/kadmind.keytab. -Entry for principal kadmin/changepw@ATHENA.MIT.EDU - with kvno 3, encryption type DES-CBC-CRC added to keytab - WRFILE:/krb5/kadmind.keytab. + WRFILE:/tmp/foo-new-keytab kadmin: .RE .fi @@ -716,7 +713,7 @@ parsed as an integer, and all entries whose kvno match that integer are removed. If the .B \-k argument is not specifeid, the default keytab -.I /etc/v5srvtab +.I /etc/krb5.keytab is used. If the .B \-q option is specified, less verbose status information is displayed. @@ -725,9 +722,9 @@ option is specified, less verbose status information is displayed. .RS .TP EXAMPLE: -kadmin: ktremove -k /krb5/kadmind.keytab kadmin/admin +kadmin: ktremove -k /usr/local/var/krb5kdc/kadmind.keytab kadmin/admin Entry for principal kadmin/admin with kvno 3 removed - from keytab WRFILE:/krb5/kadmind.keytab. + from keytab WRFILE:/usr/local/var/krb5kdc/kadmind.keytab. kadmin: .RE .fi diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index d8011f86e..9c57c86e5 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -421,7 +421,7 @@ char *kadmin_startup(argc, argv) exit(1); } { -#define DEFAULT_KEYTAB "WRFILE:/etc/v5srvtab" +#define DEFAULT_KEYTAB "WRFILE:/etc/krb5.keytab" /* XXX krb5_defkeyname is an internal library global and should go away */ extern char *krb5_defkeyname; diff --git a/src/kadmin/dbutil/ChangeLog b/src/kadmin/dbutil/ChangeLog index 4d29322d9..b8b7c2724 100644 --- a/src/kadmin/dbutil/ChangeLog +++ b/src/kadmin/dbutil/ChangeLog @@ -1,3 +1,8 @@ +Wed Mar 12 01:19:51 1997 Theodore Y. Ts'o + + * loadv4.c (argv): Check to see if the global_param's stash file + is non-NULL before trying to strdup() it. [PR#341, PR#394] + Wed Nov 13 00:06:40 1996 Mark Eichin * dump.c (load_db): lock the database directly (having fixed the diff --git a/src/kadmin/dbutil/loadv4.c b/src/kadmin/dbutil/loadv4.c index 2562eb947..9b70e97d7 100644 --- a/src/kadmin/dbutil/loadv4.c +++ b/src/kadmin/dbutil/loadv4.c @@ -192,7 +192,8 @@ char *argv[]; dbname = global_params.dbname; mkey_name = global_params.mkey_name; master_keyblock.enctype = global_params.enctype; - stash_file = strdup(global_params.stash_file); + if (global_params.stash_file) + stash_file = strdup(global_params.stash_file); rblock.max_life = global_params.max_life; rblock.max_rlife = global_params.max_rlife; rblock.expiration = global_params.expiration; diff --git a/src/kadmin/passwd/ChangeLog b/src/kadmin/passwd/ChangeLog index 5b5039315..2436ec681 100644 --- a/src/kadmin/passwd/ChangeLog +++ b/src/kadmin/passwd/ChangeLog @@ -1,3 +1,23 @@ +Wed Nov 27 13:50:03 1996 Theodore Y. Ts'o + + * configure.in: Link against kdb5 explicitly on all systems except + BSD systems, due to hairy shared library issues. [PR#257] + n.b., this is only a short-term fix for the 1.0 release. + The correct long-term fix is to not require kadm5 clients + to need to link against libkdb5 at all. + +Fri Nov 22 18:42:02 1996 Sam Hartman + + * configure.in: Do not link against kdb5 because this causes + NetBSD getpwuid to fail. [228] + + * kpasswd.c (kpasswd): Remove cast from uid_t to int. [228] + +Wed Nov 20 16:00:49 1996 Barry Jaspan + + * unit-test/Makefile.in (unit-test-): warn more loudly about unrun + tests + Wed Nov 13 19:23:15 1996 Tom Yu * unit-test/Makefile.in (clean): Remove logfiles. diff --git a/src/kadmin/passwd/configure.in b/src/kadmin/passwd/configure.in index 2331e44d0..874f3385b 100644 --- a/src/kadmin/passwd/configure.in +++ b/src/kadmin/passwd/configure.in @@ -7,8 +7,28 @@ AC_PROG_AWK USE_KADMCLNT_LIBRARY USE_GSSAPI_LIBRARY USE_GSSRPC_LIBRARY -USE_KDB5_LIBRARY USE_DYN_LIBRARY + +dnl +dnl The following is a kludge to get around a shared library problem +dnl for NetBSD and Linux. We have to include -lkdb5 under Linux, and +dnl we can't include -lkdb5 under NetBSD, due to various breakages in +dnl each system's shared library implementation +dnl +AC_MSG_CHECKING([for build host]) +AC_CACHE_VAL(krb5_cv_host, [export CC +AC_CANONICAL_HOST +krb5_cv_host=$host]) +AC_MSG_RESULT($krb5_cv_host) +case $krb5_cv_host in +*-*-*bsd*) + echo "Skipping USE KDB5 LIBRARY on BSD to avoid libdb incompatibilites" + ;; +*) + USE_KDB5_LIBRARY + ;; +esac + KRB5_LIBRARIES V5_USE_SHARED_LIB V5_AC_OUTPUT_MAKEFILE diff --git a/src/kadmin/passwd/kpasswd.c b/src/kadmin/passwd/kpasswd.c index e425280b6..48cb4ccc5 100644 --- a/src/kadmin/passwd/kpasswd.c +++ b/src/kadmin/passwd/kpasswd.c @@ -137,7 +137,7 @@ kpasswd(context, argc, argv) /* if either krb5_cc failed check the passwd file */ if (code != 0) { - pw = getpwuid((int) getuid()); + pw = getpwuid( getuid()); if (pw == NULL) { com_err(whoami, 0, string_text(KPW_STR_NOT_IN_PASSWD_FILE)); return(MISC_EXIT_STATUS); diff --git a/src/kadmin/passwd/unit-test/Makefile.in b/src/kadmin/passwd/unit-test/Makefile.in index f2192df94..8ffc57f2c 100644 --- a/src/kadmin/passwd/unit-test/Makefile.in +++ b/src/kadmin/passwd/unit-test/Makefile.in @@ -1,8 +1,10 @@ check unit-test:: unit-test-@DO_TEST@ unit-test-: - @echo "The kpasswd tests require Perl, Tcl, and runtest" - @echo "No tests run here" + @echo "+++" + @echo "+++ WARNING: kpasswd unit tests not run." + @echo "+++ Either tcl, runtest, or Perl is unavailable." + @echo "+++" unit-test-ok:: unit-test-setup unit-test-body unit-test-cleanup diff --git a/src/kadmin/server/ChangeLog b/src/kadmin/server/ChangeLog index 6092176df..9d031cb80 100644 --- a/src/kadmin/server/ChangeLog +++ b/src/kadmin/server/ChangeLog @@ -1,3 +1,7 @@ +Tue Nov 19 16:48:50 1996 Barry Jaspan + + * ovsec_kadmd.c: don't syslog \n's + Wed Nov 13 14:29:34 1996 Tom Yu * ovsec_kadmd.c (main): Note that krb5_defkeyname is an internal diff --git a/src/kadmin/server/ovsec_kadmd.c b/src/kadmin/server/ovsec_kadmd.c index 21514aca1..bd31a0bc2 100644 --- a/src/kadmin/server/ovsec_kadmd.c +++ b/src/kadmin/server/ovsec_kadmd.c @@ -183,7 +183,7 @@ int main(int argc, char *argv[]) if (ret = kadm5_get_config_params(context, NULL, NULL, ¶ms, ¶ms)) { - krb5_klog_syslog(LOG_ERR, "%s: %s while initializing, aborting\n", + krb5_klog_syslog(LOG_ERR, "%s: %s while initializing, aborting", whoami, error_message(ret)); fprintf(stderr, "%s: %s while initializing, aborting\n", whoami, error_message(ret)); @@ -197,7 +197,7 @@ int main(int argc, char *argv[]) if ((params.mask & REQUIRED_PARAMS) != REQUIRED_PARAMS) { krb5_klog_syslog(LOG_ERR, "%s: Missing required configuration values " - "while initializing, aborting\n", whoami, + "while initializing, aborting", whoami, (params.mask & REQUIRED_PARAMS) ^ REQUIRED_PARAMS); fprintf(stderr, "%s: Missing required configuration values " "(%x) while initializing, aborting\n", whoami, @@ -724,7 +724,7 @@ void log_badauth(OM_uint32 major, OM_uint32 minor, krb5_klog_syslog(LOG_NOTICE, "Authentication attempt failed: %s, GSS-API " "error strings are:", a); log_badauth_display_status(" ", major, minor); - krb5_klog_syslog(LOG_NOTICE, " GSS-API error strings complete.\n"); + krb5_klog_syslog(LOG_NOTICE, " GSS-API error strings complete."); } void log_badauth_display_status(char *msg, OM_uint32 major, OM_uint32 minor) @@ -752,11 +752,11 @@ void log_badauth_display_status_1(char *m, OM_uint32 code, int type, GSS_C_MECH_CODE, 1); } else krb5_klog_syslog(LOG_ERR, "GSS-API authentication error %s: " - "recursive failure!\n", msg); + "recursive failure!", msg); return; } - krb5_klog_syslog(LOG_NOTICE, "%s %s\n", m, (char *)msg.value); + krb5_klog_syslog(LOG_NOTICE, "%s %s", m, (char *)msg.value); (void) gss_release_buffer(&minor_stat, &msg); if (!msg_ctx) diff --git a/src/kadmin/testing/scripts/ChangeLog b/src/kadmin/testing/scripts/ChangeLog index 852bc2050..fd53ba041 100644 --- a/src/kadmin/testing/scripts/ChangeLog +++ b/src/kadmin/testing/scripts/ChangeLog @@ -1,3 +1,7 @@ +Thu Dec 5 19:34:09 1996 Tom Yu + + * save_files.sh (files): Also save /etc/krb5.keytab. [PR 278] + Thu Nov 14 15:28:16 1996 Barry Jaspan * env-setup.shin, init_db, save_files.sh, start_servers, diff --git a/src/kadmin/testing/scripts/save_files.sh b/src/kadmin/testing/scripts/save_files.sh index 14fe892d4..72182036f 100644 --- a/src/kadmin/testing/scripts/save_files.sh +++ b/src/kadmin/testing/scripts/save_files.sh @@ -15,7 +15,7 @@ done # /.secure/etc/passwd /etc/athena/inetd.conf" files="/etc/krb.conf /etc/krb.realms /etc/athena/krb.conf \ - /etc/athena/krb.realms /etc/v5srvtab" + /etc/athena/krb.realms /etc/v5srvtab /etc/krb5.keytab" name=`basename $0` diff --git a/src/kadmin/testing/util/ChangeLog b/src/kadmin/testing/util/ChangeLog index e324ed6e6..698414ab2 100644 --- a/src/kadmin/testing/util/ChangeLog +++ b/src/kadmin/testing/util/ChangeLog @@ -1,3 +1,16 @@ +Fri Dec 6 00:04:10 1996 Theodore Y. Ts'o + + * test.c: Change test looking for tcl 7.05 and greater to be tcl + 7.04 and greater, since BSDI ships with tcl 7.04, and + needs this change. [PR#282] + +Thu Dec 5 22:47:27 1996 Theodore Y. Ts'o + + * tcl_ovsec_kadm.c: + * tcl_kadm5.c: Remove #include of , which is not + guaranteed to be there. #include of is all you + need for malloc(), per ANSI. [PR#281] + Wed Nov 13 09:55:05 1996 Ezra Peisach * Makefile.in (clean): Remove built programs. diff --git a/src/kadmin/testing/util/tcl_kadm5.c b/src/kadmin/testing/util/tcl_kadm5.c index 2aa36636d..409f02396 100644 --- a/src/kadmin/testing/util/tcl_kadm5.c +++ b/src/kadmin/testing/util/tcl_kadm5.c @@ -4,7 +4,6 @@ #define USE_KADM5_API_VERSION 2 #include #include -#include #include #include #include diff --git a/src/kadmin/testing/util/tcl_ovsec_kadm.c b/src/kadmin/testing/util/tcl_ovsec_kadm.c index 0c6aaac9c..40a854e95 100644 --- a/src/kadmin/testing/util/tcl_ovsec_kadm.c +++ b/src/kadmin/testing/util/tcl_ovsec_kadm.c @@ -4,7 +4,6 @@ #define USE_KADM5_API_VERSION 1 #include #include -#include #include #include #include diff --git a/src/kadmin/testing/util/test.c b/src/kadmin/testing/util/test.c index 75a0fc25f..f9da05238 100644 --- a/src/kadmin/testing/util/test.c +++ b/src/kadmin/testing/util/test.c @@ -1,8 +1,8 @@ #include -#define IS_TCL_7_5 ((TCL_MAJOR_VERSION * 100 + TCL_MINOR_VERSION) >= 705) +#define _TCL_MAIN ((TCL_MAJOR_VERSION * 100 + TCL_MINOR_VERSION) >= 704) -#if IS_TCL_7_5 +#if _TCL_MAIN int main(argc, argv) int argc; /* Number of command-line arguments. */ diff --git a/src/kadmin/v4server/ChangeLog b/src/kadmin/v4server/ChangeLog index 7572a6380..2966ad100 100644 --- a/src/kadmin/v4server/ChangeLog +++ b/src/kadmin/v4server/ChangeLog @@ -1,3 +1,9 @@ +Fri Nov 22 15:49:27 1996 unknown + + * kadm_ser_wrap.c (endif ): use sizeof instead of h_length to + determine number of bytes of addr to copy from DNS response + [krb5-misc/211] + Wed Nov 13 19:24:00 1996 Tom Yu * Makefile.in (clean): Remove kadm_err.h and kadm_err.c. diff --git a/src/kadmin/v4server/kadm_ser_wrap.c b/src/kadmin/v4server/kadm_ser_wrap.c index 3d4c045ed..7ea289f24 100644 --- a/src/kadmin/v4server/kadm_ser_wrap.c +++ b/src/kadmin/v4server/kadm_ser_wrap.c @@ -82,7 +82,7 @@ kadm_ser_init(inter, realm) if ((hp = gethostbyname(hostname)) == NULL) return KADM_NO_HOSTNAME; memcpy((char *) &server_parm.admin_addr.sin_addr.s_addr, hp->h_addr, - hp->h_length); + sizeof(server_parm.admin_addr.sin_addr.s_addr)); server_parm.admin_addr.sin_port = sep->s_port; /* setting up the database */ mkey_name = KRB5_KDB_M_NAME; diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index dd7446081..b3b98479a 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,75 @@ +Thu Feb 5 19:09:06 1998 Tom Yu + + * kerberos_v4.c: Fix up call to klog, also delete logic to check + whether v4 processing is disabled (relies on code that is only in + the mainline). + +Wed Feb 4 14:15:20 1998 Theodore Y. Ts'o + + * kerberos_v4.c (process_v4): Check the length of the incoming V4 + packet before copying it into the KTEXT_ST variable. + (kerberos_v4): Make sure the strings in the V4 request + structures aren't no longer than they are allowed to be. + +Fri Jan 16 03:33:50 1998 Tom Yu + + * do_tgs_req.c: Add some explicit settings of errcode so that the + cleanup code doesn't try to construct a bogus error reply, which + was causing coredumps in the lookaside code. + +Mon Nov 24 19:57:48 1997 Theodore Y. Ts'o + + * do_tgs_req.c (process_tgs_req): Add check to make sure cname and + sname are non-NULL when syslogging an error because the + principals don't match. + + * kdc_util.c (limit_string): Check to make sure the input string + is non-NULL before operating on it. + +Wed Sep 24 11:56:50 1997 Ezra Peisach + + * kdc_util.c (add_to_transited): Fix up memory leaks, clean out + new memory allocated, allocate buffers to max size + needed. [based on krb5-kdc/461 by Ken Hornstein]. + +Tue Jul 15 01:55:56 1997 Tom Yu + + * kdc_preauth.c (get_sam_edata): Don't goto cleanup if SAM is not + used; this prevents freeing an unallocated keyblock. + +Thu May 29 21:08:24 1997 Theodore Y. Ts'o + + * do_as_req.c (process_as_req), do_tgs_req (process_tgs_req): Use + limit_string() to make sure the length of cname and sname + are reasonable. + + * kdc_util.c (limit_string): New function which limits the strings + that will end up in log files to "reasonable" lengths. + +Wed Jan 1 22:56:16 1997 Ezra Peisach + + * kdc_preauth.c (get_sam_edata): Use proper interface to + krb5_db_get_principal. Also if SAM is not an option, do + not return as a possible type to client. [krb5-kdc/310] + +Sat Nov 23 17:26:22 1996 Mark Eichin + + * [krb5-libs/149] only generate requests that you can actually + handle. + + Tue Sep 3 22:53:56 1996 Mark Eichin + + * kdc_preauth.c (get_preauth_hint_list): detect ap->get_edata + return status and don't pass back hint if it failed. + (get_etype_info): malloc one more word in entry for end marker. + +Wed Nov 20 11:25:05 1996 Barry Jaspan + + * main.c (initialize_realms): krb5_aprof_init can succeed while + leaving aprof == NULL, but krb5_aprof_finish will fail. This is + just more grossness that needs to be redone when the kdc.conf + interface is reworked. + Thu Nov 7 12:27:21 1996 Theodore Ts'o * kdc_preauth.c (check_padata): Fixed error handling; in order for diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index cf999fec3..bb2ca80ff 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -99,6 +99,7 @@ krb5_data **response; /* filled in with a response packet */ status = "UNPARSING_CLIENT"; goto errout; } + limit_string(cname); if (!request->server) { status = "NULL_SERVER"; errcode = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN; @@ -108,6 +109,7 @@ krb5_data **response; /* filled in with a response packet */ status = "UNPARSING_SERVER"; goto errout; } + limit_string(sname); c_nprincs = 1; if ((errcode = krb5_db_get_principal(kdc_context, request->client, diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c index 0ea2df1cd..242a6c320 100644 --- a/src/kdc/do_tgs_req.c +++ b/src/kdc/do_tgs_req.c @@ -130,6 +130,7 @@ krb5_data **response; /* filled in with a response packet */ } if (!header_ticket) { + errcode = KRB5_NO_TKT_SUPPLIED; /* XXX? */ status="UNEXPECTED NULL in header_ticket"; goto cleanup; } @@ -419,6 +420,7 @@ tgt_again: if (!(scratch.data = malloc(request->authorization_data.ciphertext.length))) { status = "AUTH_NOMEM"; + errcode = ENOMEM; goto cleanup; } /* do any necessary key pre-processing */ @@ -525,8 +527,11 @@ tgt_again: &tmp))) tmp = 0; krb5_klog_syslog(LOG_INFO, "TGS_REQ %s(%d): 2ND_TKT_MISMATCH: authtime %d, %s for %s, 2nd tkt client %s", - fromstring, portnum, authtime, cname, sname, + fromstring, portnum, authtime, + cname ? cname : "", + sname ? sname : "", tmp ? tmp : ""); + errcode = KRB5KDC_ERR_SERVER_NOMATCH; goto cleanup; } diff --git a/src/kdc/kdc_preauth.c b/src/kdc/kdc_preauth.c index 0350068f9..4c28b0b51 100644 --- a/src/kdc/kdc_preauth.c +++ b/src/kdc/kdc_preauth.c @@ -203,8 +203,15 @@ void get_preauth_hint_list(request, client, server, e_data) memset(*pa, 0, sizeof(krb5_pa_data)); (*pa)->magic = KV5M_PA_DATA; (*pa)->pa_type = ap->type; - if (ap->get_edata) - (ap->get_edata)(kdc_context, request, client, server, *pa); + if (ap->get_edata) { + retval = (ap->get_edata)(kdc_context, request, client, server, *pa); + if (retval) { + /* just failed on this type, continue */ + free(*pa); + *pa = 0; + continue; + } + } pa++; } retval = encode_krb5_padata_sequence((const krb5_pa_data **) pa_data, @@ -433,7 +440,7 @@ get_etype_info(context, request, client, server, pa_data) salt.data = 0; - entry = malloc((client->n_key_data * 2) * sizeof(krb5_etype_info_entry *)); + entry = malloc((client->n_key_data * 2 + 1) * sizeof(krb5_etype_info_entry *)); if (entry == NULL) return ENOMEM; entry[0] = NULL; @@ -630,7 +637,8 @@ get_sam_edata(context, request, client, server, pa_data) { char *uname; - int npr = 1, more; + int npr = 1; + krb5_boolean more; krb5_db_entry assoc; krb5_key_data *assoc_key; krb5_principal newp; @@ -656,7 +664,7 @@ get_sam_edata(context, request, client, server, pa_data) strlen(sam_ptr->name); npr = 1; retval = krb5_db_get_principal(kdc_context, newp, &assoc, &npr, &more); - if(!retval) { + if(!retval && npr) { sc.sam_type = sam_ptr->sam_type; break; } @@ -690,7 +698,9 @@ get_sam_edata(context, request, client, server, pa_data) } /* now we can use encrypting_key... */ } - } + } else + /* SAM is not an option - so don't return as hint */ + return KRB5_PREAUTH_BAD_TYPE; krb5_princ_component(kdc_context,newp,probeslot)->data = 0; krb5_princ_component(kdc_context,newp,probeslot)->length = 0; diff --git a/src/kdc/kdc_util.c b/src/kdc/kdc_util.c index a711a27e8..a2e6b262a 100644 --- a/src/kdc/kdc_util.c +++ b/src/kdc/kdc_util.c @@ -532,7 +532,7 @@ add_to_transited(tgt_trans, new_trans, tgs, client, server) { char *realm; char *trans; - char *otrans; + char *otrans, *otrans_ptr; /* The following are for stepping through the transited field */ @@ -553,17 +553,28 @@ add_to_transited(tgt_trans, new_trans, tgs, client, server) realm[krb5_princ_realm(kdc_context, tgs)->length] = '\0'; if (!(otrans = (char *) malloc(tgt_trans->length+1))) { + free(realm); return(ENOMEM); } memcpy(otrans, tgt_trans->data, tgt_trans->length); otrans[tgt_trans->length] = '\0'; - - if (!(trans = (char *) malloc(strlen(realm) + strlen(otrans) + 1))) { + /* Keep track of start so we can free */ + otrans_ptr = otrans; + + /* +1 for null, + +1 for extra comma which may be added between + +1 for potential space when leading slash in realm */ + if (!(trans = (char *) malloc(strlen(realm) + strlen(otrans) + 3))) { + free(realm); + free(otrans_ptr); return(ENOMEM); } if (new_trans->data) free(new_trans->data); new_trans->data = trans; + new_trans->length = 0; + + trans[0] = '\0'; /* For the purpose of appending, the realm preceding the first */ /* realm in the transited field is considered the null realm */ @@ -701,6 +712,8 @@ add_to_transited(tgt_trans, new_trans, tgs, client, server) new_trans->length = strlen(trans) + 1; } + free(realm); + free(otrans_ptr); return(0); } @@ -912,7 +925,7 @@ krb5_data *data; { unsigned char *estream; /* end of stream */ int classes; /* # classes seen so far this level */ - int levels = 0; /* levels seen so far */ + unsigned int levels = 0; /* levels seen so far */ int lastlevel = 1000; /* last level seen */ int length; /* various lengths */ int tag; /* tag number */ @@ -1375,8 +1388,26 @@ get_salt_from_key(context, client, client_key, salt) return 0; } +/* + * Limit strings to a "reasonable" length to prevent crowding out of + * other useful information in the log entry + */ +#define NAME_LENGTH_LIMIT 128 - - - - +void limit_string(char *name) +{ + int i; + + if (!name) + return; + + if (strlen(name) < NAME_LENGTH_LIMIT) + return; + + i = NAME_LENGTH_LIMIT-4; + name[i++] = '.'; + name[i++] = '.'; + name[i++] = '.'; + name[i] = '\0'; + return; +} diff --git a/src/kdc/kerberos_v4.c b/src/kdc/kerberos_v4.c index db074d993..726b244a6 100644 --- a/src/kdc/kerberos_v4.c +++ b/src/kdc/kerberos_v4.c @@ -82,6 +82,7 @@ char * v4_klog KRB5_PROTOTYPE((int, const char *, ...)); #else char * v4_klog KRB5_PROTOTYPE((int, char *, va_dcl)); #endif +#define klog v4_klog /* take this out when we don't need it anymore */ int krbONE = 1; @@ -104,7 +105,7 @@ static Principal a_name_data; /* for requesting user */ static Principal s_name_data; /* for services requested */ static C_Block session_key; -static char log_text[128]; +static char log_text[512]; static char *lt; static int more; @@ -190,6 +191,10 @@ krb5_data **resp; /* convert v5 packet structure to v5's. * this copy is gross, but necessary: */ + if (pkt->length > MAX_KTXT_LEN) { + (void) klog(L_KRB_PERR, "V4 request too long."); + return KRB5KRB_ERR_FIELD_TOOLONG; + } v4_pkt.length = pkt->length; memcpy( v4_pkt.dat, pkt->data, pkt->length); @@ -218,7 +223,6 @@ int type_2_v5err[] = { 0, /* 0 No error */ KRB_AP_ERR_BADVERSION /* L_KRB_PWARN 16 Protocol warning messages */ }; #endif -#define klog v4_klog #ifdef HAVE_STDARG_H char * v4_klog( int type, const char *format, ...) #else @@ -448,6 +452,21 @@ kerb_get_principal(name, inst, principal, maxn, more) *more = (int) more5 || (nprinc > maxn); return( nprinc); } + +static void str_length_check(str, max_size) + char *str; + int max_size; +{ + int i; + char *cp; + + for (i=0, cp = str; i < max_size-1; i++, cp++) { + if (*cp == 0) + return; + } + *cp = 0; +} + void kerberos_v4(client, pkt) struct sockaddr_in *client; @@ -528,8 +547,11 @@ kerberos_v4(client, pkt) /* set up and correct for byte order and alignment */ req_name_ptr = (char *) pkt_a_name(pkt); + str_length_check(req_name_ptr, ANAME_SZ); req_inst_ptr = (char *) pkt_a_inst(pkt); + str_length_check(req_inst_ptr, INST_SZ); req_realm_ptr = (char *) pkt_a_realm(pkt); + str_length_check(req_realm_ptr, REALM_SZ); memcpy(&req_time_ws, pkt_time_ws(pkt), sizeof(req_time_ws)); /* time has to be diddled */ if (swap_bytes) { @@ -540,7 +562,9 @@ kerberos_v4(client, pkt) req_life = (u_long) (*ptr++); service = ptr; + str_length_check(service, SNAME_SZ); instance = ptr + strlen(service) + 1; + str_length_check(instance, INST_SZ); rpkt = &rpkt_st; @@ -672,7 +696,9 @@ kerberos_v4(client, pkt) req_life = (u_long) (*ptr++); service = ptr; + str_length_check(service, SNAME_SZ); instance = ptr + strlen(service) + 1; + str_length_check(instance, INST_SZ); klog(L_APPL_REQ, "APPL Request %s.%s@%s on %s for %s.%s", ad->pname, ad->pinst, ad->prealm, diff --git a/src/kdc/main.c b/src/kdc/main.c index dd4ae7687..bc7a2fee1 100644 --- a/src/kdc/main.c +++ b/src/kdc/main.c @@ -721,7 +721,9 @@ initialize_realms(kcontext, argc, argv) hierarchy[2] = (char *) NULL; if (krb5_aprof_get_string(aprof, hierarchy, TRUE, &default_ports)) default_ports = 0; - krb5_aprof_finish(aprof); + /* aprof_init can return 0 with aprof == NULL */ + if (aprof) + krb5_aprof_finish(aprof); } if (default_ports == 0) default_ports = strdup(DEFAULT_KDC_PORTLIST); diff --git a/src/krb524/ChangeLog b/src/krb524/ChangeLog index dbc3c841d..7f5856dbb 100644 --- a/src/krb524/ChangeLog +++ b/src/krb524/ChangeLog @@ -1,3 +1,14 @@ +Thu Dec 5 23:27:00 1996 Tom Yu + + * krb524d.c (main): Ignore SIGHUP for now. [27] + +Thu Dec 5 23:12:29 1996 Theodore Y. Ts'o + + * cnv_tkt_skey.c (krb524_convert_tkt_skey): Change the issue time + of the V4 ticket to be the current time (since the + lifetime of the V4 ticket was calculated assuming that the + issue time would be the current time). [PR#283,PR#22] + Mon Nov 11 16:23:32 1996 Mark Eichin * krb524d.c (do_connection): only free v4/v5 keyblock contents and diff --git a/src/krb524/cnv_tkt_skey.c b/src/krb524/cnv_tkt_skey.c index a7d5e54ed..19bb386f3 100644 --- a/src/krb524/cnv_tkt_skey.c +++ b/src/krb524/cnv_tkt_skey.c @@ -161,7 +161,7 @@ int krb524_convert_tkt_skey(context, v5tkt, v4tkt, v5_skey, v4_skey) (char *) v5etkt->session->contents, lifetime, /* issue_data */ - v5etkt->times.starttime, + server_time, sname, sinst, v4_skey->contents); diff --git a/src/krb524/krb524d.c b/src/krb524/krb524d.c index 2c4d3f839..7d6e9ba16 100644 --- a/src/krb524/krb524d.c +++ b/src/krb524/krb524d.c @@ -119,7 +119,7 @@ int main(argc, argv) } signal(SIGINT, request_exit); - signal(SIGHUP, request_exit); + signal(SIGHUP, SIG_IGN); signal(SIGTERM, request_exit); if (use_keytab) diff --git a/src/lib/ChangeLog b/src/lib/ChangeLog index c7e7fb6b1..791ed2b99 100644 --- a/src/lib/ChangeLog +++ b/src/lib/ChangeLog @@ -1,3 +1,15 @@ +Sat Nov 23 00:25:25 1996 Theodore Ts'o + + * libkrb5.def: Renamed to krb5_16.def [PR#204] + + * Makefile.in (all-windows): Change name of dll from krb5_16.dll, + which will be the final name of the DLL. [PR#204] + +Wed Nov 20 18:28:47 1996 Theodore Y. Ts'o + + * Makefile.in (clean-windows): Change the name of the Windows (16) + dll to be krb516.dll, instead of libkrb5.dll + Fri Jul 12 20:32:29 1996 Theodore Y. Ts'o * win_glue.c: Added TIMEBOMB_INFO string which tells the user the diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in index f0eaef89f..b8cd3980a 100644 --- a/src/lib/Makefile.in +++ b/src/lib/Makefile.in @@ -19,10 +19,10 @@ clean-unix:: $(RM) $(CLEANLIBS) clean-windows:: - $(RM) libkrb5.dll libkrb5.lib libkrb5.bak libkrb5.map winsock.lib + $(RM) krb5_16.dll krb5_16.lib krb5_16.bak krb5_16.map winsock.lib $(RM) gssapi.dll gssapi.lib gssapi.bak gssapi.map # -# Windows stuff to make libkrb5.dll and libkrb5.lib. Currently it +# Windows stuff to make krb5_16.dll and krb5_16.lib. Currently it # combines crypto, krb5, kadm and the util/et directories. # ALIB = kadm\kadm.lib @@ -34,7 +34,7 @@ PLIB = $(BUILDTOP)\util\profile\profile.lib WLIB = .\winsock.lib LIBS = $(ALIB) $(CLIB) $(KLIB) $(GLIB) $(ETLIB) $(PLIB) $(WLIB) -lib-windows: winsock.lib libkrb5.lib gssapi.lib +lib-windows: winsock.lib krb5_16.lib gssapi.lib gssapi.lib:: gssapi.dll implib /nologo gssapi.lib gssapi.dll @@ -44,13 +44,13 @@ gssapi.dll:: $(GLIB) $(LIBS) gssapi.def win_glue.obj $(LIBS) ldllcew libw oldnames, gssapi.def rc /nologo /p /k gssapi.dll -libkrb5.lib:: libkrb5.dll - implib /nologo libkrb5.lib libkrb5.dll +krb5_16.lib:: krb5_16.dll + implib /nologo krb5_16.lib krb5_16.dll -libkrb5.dll:: $(LIBS) libkrb5.def win_glue.obj - link /co /seg:400 /noe /nod /nol win_glue, libkrb5.dll, libkrb5.map, \ - $(LIBS) ldllcew libw oldnames, libkrb5.def - rc /nologo /p /k libkrb5.dll +krb5_16.dll:: $(LIBS) krb5_16.def win_glue.obj + link /co /seg:400 /noe /nod /nol win_glue, krb5_16.dll, krb5_16.map, \ + $(LIBS) ldllcew libw oldnames, krb5_16.def + rc /nologo /p /k krb5_16.dll sap_glue.obj: win_glue.c $(CC) $(CFLAGS) -DSAP_TIMEBOMB -I$(VERS_DIR) /c \ @@ -83,7 +83,7 @@ all-windows:: @echo Making in lib cd .. -all-windows:: libkrb5.lib gssapi.lib +all-windows:: krb5_16.lib gssapi.lib clean-windows:: @echo Making clean in lib\crypto diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index 680319932..ecdb1d41e 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,17 @@ +Sat Nov 23 00:22:20 1996 Theodore Ts'o + + * cryptoconf.c: Also zero out the entries in cryptoconf, to make + sure no one tries to use triple DES and SHA. + +Fri Nov 22 20:49:13 1996 Theodore Ts'o + + * configure.in (enableval): Disable triple DES and SHA, since + what's there isn't the final triple DES. [PR#231] + +Mon Nov 18 20:38:24 1996 Ezra Peisach + [krb5-libs/201] + * configure.in: Set shared library version to 1.0. + Thu Jun 6 00:04:38 1996 Theodore Y. Ts'o * Makefile.in (all-windows): Don't pass $(LIBCMD) on the command diff --git a/src/lib/crypto/configure.in b/src/lib/crypto/configure.in index 9e0451004..53f9fcc39 100644 --- a/src/lib/crypto/configure.in +++ b/src/lib/crypto/configure.in @@ -19,17 +19,17 @@ if test "$enableval" = yes; then else AC_MSG_RESULT(Disabling DES_CBC_MD5) fi -AC_ARG_ENABLE([des3-cbc-sha], -[ --enable-des3-cbc-sha enable DES3_CBC_SHA (DEFAULT). - --disable-des3-cbc-sha disable DES3_CBC_SHA.], -, -enableval=yes)dnl -if test "$enableval" = yes; then - AC_MSG_RESULT(Enabling DES3_CBC_SHA) - AC_DEFINE(PROVIDE_DES3_CBC_SHA) -else - AC_MSG_RESULT(Disabling DES3_CBC_SHA) -fi +dnl AC_ARG_ENABLE([des3-cbc-sha], +dnl [ --enable-des3-cbc-sha enable DES3_CBC_SHA (DEFAULT). +dnl --disable-des3-cbc-sha disable DES3_CBC_SHA.], +dnl , +dnl enableval=yes)dnl +dnl if test "$enableval" = yes; then +dnl AC_MSG_RESULT(Enabling DES3_CBC_SHA) +dnl AC_DEFINE(PROVIDE_DES3_CBC_SHA) +dnl else +dnl AC_MSG_RESULT(Disabling DES3_CBC_SHA) +dnl fi AC_ARG_WITH([des-cbc-crc], [ --enable-des-cbc-crc enable DES_CBC_CRC (DEFAULT). --disable-des-cbc-crc disable DES_CBC_CRC.], @@ -52,17 +52,17 @@ if test "$enableval" = yes; then else AC_MSG_RESULT(Disabling DES_CBC_RAW) fi -AC_ARG_WITH([des3-cbc-raw], -[ --enable-des3-cbc-raw enable DES3_CBC_RAW (DEFAULT). - --disable-des3-cbc-raw disable DES3_CBC_RAW.], -, -enableval=yes)dnl -if test "$enableval" = yes; then - AC_MSG_RESULT(Enabling DES3_CBC_RAW) - AC_DEFINE(PROVIDE_DES3_CBC_RAW) -else - AC_MSG_RESULT(Disabling DES3_CBC_RAW) -fi +dnl AC_ARG_WITH([des3-cbc-raw], +dnl [ --enable-des3-cbc-raw enable DES3_CBC_RAW (DEFAULT). +dnl --disable-des3-cbc-raw disable DES3_CBC_RAW.], +dnl , +dnl enableval=yes)dnl +dnl if test "$enableval" = yes; then +dnl AC_MSG_RESULT(Enabling DES3_CBC_RAW) +dnl AC_DEFINE(PROVIDE_DES3_CBC_RAW) +dnl else +dnl AC_MSG_RESULT(Disabling DES3_CBC_RAW) +dnl fi AC_ARG_WITH([des-cbc-cksum], [ --enable-des-cbc-cksum enable DES_CBC_CKSUM (DEFAULT). --disable-des-cbc-cksum disable DES_CBC_CKSUM.], @@ -107,20 +107,20 @@ if test "$enableval" = yes; then else AC_MSG_RESULT(Disabling RSA_MD5) fi -AC_ARG_WITH([nist-sha], -[ --enable-nist-sha enable NIST_SHA (DEFAULT). - --disable-nist-sha disable NIST_SHA.], -, -enableval=yes)dnl -if test "$enableval" = yes; then - AC_MSG_RESULT(Enabling NIST_SHA) - AC_DEFINE(PROVIDE_NIST_SHA) -else - AC_MSG_RESULT(Disabling NIST_SHA) -fi +dnl AC_ARG_WITH([nist-sha], +dnl [ --enable-nist-sha enable NIST_SHA (DEFAULT). +dnl --disable-nist-sha disable NIST_SHA.], +dnl , +dnl enableval=yes)dnl +dnl if test "$enableval" = yes; then +dnl AC_MSG_RESULT(Enabling NIST_SHA) +dnl AC_DEFINE(PROVIDE_NIST_SHA) +dnl else +dnl AC_MSG_RESULT(Disabling NIST_SHA) +dnl fi V5_SHARED_LIB_OBJS SubdirLibraryRule([${OBJS}]) DO_SUBDIRS -V5_MAKE_SHARED_LIB(libcrypto,0.1,.., ./crypto) +V5_MAKE_SHARED_LIB(libcrypto,1.0,.., ./crypto) V5_AC_OUTPUT_MAKEFILE diff --git a/src/lib/crypto/cryptoconf.c b/src/lib/crypto/cryptoconf.c index 768c6cf3c..62be74581 100644 --- a/src/lib/crypto/cryptoconf.c +++ b/src/lib/crypto/cryptoconf.c @@ -53,8 +53,10 @@ #ifdef PROVIDE_NIST_SHA #include "shs.h" -#define SHA_CKENTRY &nist_sha_cksumtable_entry -#define HMAC_SHA_CKENTRY &hmac_sha_cksumtable_entry +/* #define SHA_CKENTRY &nist_sha_cksumtable_entry */ +/* #define HMAC_SHA_CKENTRY &hmac_sha_cksumtable_entry */ +#define SHA_CKENTRY 0 +#define HMAC_SHA_CKENTRY 0 #else #define SHA_CKENTRY 0 #define HMAC_SHA_CKENTRY 0 @@ -109,7 +111,11 @@ #include "des_int.h" #define _DES_DONE__ #endif -#define DES3_CBC_SHA_CSENTRY &krb5_des3_sha_cst_entry +/* Don't try to enable triple DES unless you know what you are doing; */ +/* the current implementation of triple DES is NOT the final and */ +/* correct implementation.!!! */ +/* #define DES3_CBC_SHA_CSENTRY &krb5_des3_sha_cst_entry */ +#define DES3_CBC_SHA_CSENTRY 0 #else #define DES3_CBC_SHA_CSENTRY 0 #endif @@ -119,7 +125,8 @@ #include "des_int.h" #define _DES_DONE__ #endif -#define DES3_CBC_RAW_CSENTRY &krb5_des3_raw_cst_entry +/* #define DES3_CBC_RAW_CSENTRY &krb5_des3_raw_cst_entry */ +#define DES3_CBC_RAW_CSENTRY 0 #else #define DES3_CBC_RAW_CSENTRY 0 #endif diff --git a/src/lib/des425/ChangeLog b/src/lib/des425/ChangeLog index c0c8faa43..8b1457e07 100644 --- a/src/lib/des425/ChangeLog +++ b/src/lib/des425/ChangeLog @@ -1,3 +1,7 @@ +Mon Nov 18 20:39:02 1996 Ezra Peisach + + * configure.in: Set shared library version to 1.0. [krb5-libs/201] + Wed Aug 7 12:50:36 1996 Ezra Peisach * new_rnd_key.c (des_set_sequence_number): Change cast to diff --git a/src/lib/des425/configure.in b/src/lib/des425/configure.in index 08126b06c..07072c9f2 100644 --- a/src/lib/des425/configure.in +++ b/src/lib/des425/configure.in @@ -29,5 +29,5 @@ AC_SUBST(CRYPTO_SH_VERS) KRB5_SH_VERS=$krb5_cv_shlib_version_libkrb5 AC_SUBST(KRB5_SH_VERS) KRB5_RUN_FLAGS -V5_MAKE_SHARED_LIB(libdes425,0.1,.., ./des425) +V5_MAKE_SHARED_LIB(libdes425,1.0,.., ./des425) V5_AC_OUTPUT_MAKEFILE diff --git a/src/lib/gssapi/ChangeLog b/src/lib/gssapi/ChangeLog index 505b5d355..b29cc371b 100644 --- a/src/lib/gssapi/ChangeLog +++ b/src/lib/gssapi/ChangeLog @@ -1,3 +1,7 @@ +Mon Nov 18 20:39:41 1996 Ezra Peisach + + * configure.in: Set shared library version to 1.0. [krb5-libs/201] + Tue Jul 23 22:50:22 1996 Theodore Y. Ts'o * Makefile.in (MAC_SUBDIRS): Remove mechglue from the list of diff --git a/src/lib/gssapi/configure.in b/src/lib/gssapi/configure.in index 164582c64..f2bb70429 100644 --- a/src/lib/gssapi/configure.in +++ b/src/lib/gssapi/configure.in @@ -7,7 +7,7 @@ AC_PROG_ARCHIVE_ADD AC_PROG_RANLIB AC_PROG_INSTALL DO_SUBDIRS -V5_MAKE_SHARED_LIB(libgssapi_krb5,0.1,.., ./gssapi) +V5_MAKE_SHARED_LIB(libgssapi_krb5,1.0,.., ./gssapi) CRYPTO_SH_VERS=$krb5_cv_shlib_version_libcrypto AC_SUBST(CRYPTO_SH_VERS) COMERR_SH_VERS=$krb5_cv_shlib_version_libcom_err diff --git a/src/lib/gssapi/generic/ChangeLog b/src/lib/gssapi/generic/ChangeLog index 993470825..30fd1c3c2 100644 --- a/src/lib/gssapi/generic/ChangeLog +++ b/src/lib/gssapi/generic/ChangeLog @@ -1,3 +1,12 @@ +Wed Nov 20 13:59:58 1996 Ezra Peisach + + * Makefile.in (install): Install gssapi.h from the build tree. + +Tue Nov 19 16:43:16 1996 Tom Yu + + * Makefile.in (gssapi.h): grep USE_.*_H out from autoconf.h as + well (some stuff was depending on USE_STRING_H). + Mon Nov 18 12:38:34 1996 Tom Yu *gssapi.h: Renamed to gssapi.hin. diff --git a/src/lib/gssapi/generic/Makefile.in b/src/lib/gssapi/generic/Makefile.in index 1e1aa7ebb..87b414f47 100644 --- a/src/lib/gssapi/generic/Makefile.in +++ b/src/lib/gssapi/generic/Makefile.in @@ -37,6 +37,7 @@ gssapi.h: gssapi.hin echo "/* It contains some choice pieces of autoconf.h */" >> $@ grep SIZEOF $(BUILDTOP)/include/krb5/autoconf.h >> $@ grep 'HAVE_.*_H' $(BUILDTOP)/include/krb5/autoconf.h >> $@ + grep 'USE_.*_H' $(BUILDTOP)/include/krb5/autoconf.h >> $@ echo "/* End of gssapi.h prologue. */" cat $(srcdir)/gssapi.hin >> $@ @@ -84,7 +85,8 @@ OBJS = \ $(OBJS): $(HDRS) $(ETHDRS) -EXPORTED_HEADERS= gssapi.h gssapi_generic.h +EXPORTED_HEADERS= gssapi_generic.h +EXPORTED_BUILT_HEADERS= gssapi.h all-unix:: shared $(SRCS) $(ETHDRS) $(OBJS) @@ -116,5 +118,9 @@ install:: do $(INSTALL_DATA) $(srcdir)/$$f \ $(DESTDIR)$(KRB5_INCDIR)/gssapi/$$f ; \ done + @set -x; for f in $(EXPORTED_BUILT_HEADERS) ; \ + do $(INSTALL_DATA) $$f \ + $(DESTDIR)$(KRB5_INCDIR)/gssapi/$$f ; \ + done depend:: $(ETSRCS) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index fb51f0dba..2bdd46780 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,58 @@ +Thu Feb 5 22:39:44 1998 Theodore Y. Ts'o + + * wrap_size_limit.c (krb5_gss_wrap_size_limit): Fix bug where if + the output header size is greater than the maximum + requested output size, return 0 rather than a very large + unsigned number. :-) + +Wed Jan 21 19:14:09 1998 Tom Yu + + * gssapiP_krb5.h: Add rcache member to the creds + structure. [krb5-libs/370] + + * accept_sec_context.c (krb5_gss_accept_sec_context): Actually set + an rcache in auth context from the one saved in the creds + structure. [krb5-libs/370] + + * acquire_cred.c (acquire_accept_cred): Set up an rcache for use + later. [krb5-libs/370] + + * delete_sec_context.c (krb5_gss_delete_sec_context): Don't delete + the rcache when freeing the auth_context. [krb5-libs/370] + + * rel_cred.c (krb5_gss_release_cred): Properly close the + rcache. [krb5-libs/370] + +Tue Mar 25 01:00:55 1997 Theodore Y. Ts'o + + * init_sec_context.c (krb5_gss_init_sec_context): A zero-length + token should be treated like a GSS_C_NO_BUFFER during the + initial context establishment. [krb5-libs/352] + +Wed Nov 20 19:55:29 1996 Marc Horowitz + + * init_sec_context.c (make_ap_rep, krb5_gss_init_sec_context), + accept_sec_context.c (krb5_gss_accept_sec_context): fix up use of + gss flags. under some circumstances, the context would not have + checked for replay or sequencing, even if those features were + requested. + + * init_sec_context.c (make_ap_req), (krb5_gss_init_sec_context): + If delegation is requested, but forwarding the credentials fails, + instead of aborting the context setup, just don't forward + credentials. + + * gssapiP_krb5.h (krb5_gss_ctx_id_t), ser_sctx.c + (kg_ctx_externalize, kg_ctx_internalize), init_sec_context.c + (krb5_gss_init_sec_context), get_tkt_flags.c + (gss_krb5_get_tkt_flags), accept_sec_context.c + (krb5_gss_accept_sec_context): rename ctx->flags to + ctx->krb_flags, to disambiguate it from ctx->gss_flags + + * accept_sec_context.c (krb5_gss_accept_sec_context): If the subkey + isn't present in the authenticator, then use the session key + instead. + Sat Oct 19 00:38:22 1996 Theodore Y. Ts'o * ser_sctx.c (kg_oid_externalize, kg_oid_internalize, diff --git a/src/lib/gssapi/krb5/accept_sec_context.c b/src/lib/gssapi/krb5/accept_sec_context.c index 234606921..20b800be9 100644 --- a/src/lib/gssapi/krb5/accept_sec_context.c +++ b/src/lib/gssapi/krb5/accept_sec_context.c @@ -237,6 +237,14 @@ krb5_gss_accept_sec_context(minor_status, context_handle, /* decode the message */ + if ((code = krb5_auth_con_init(context, &auth_context))) { + *minor_status = code; + return(GSS_S_FAILURE); + } + if ((code = krb5_auth_con_setrcache(context, auth_context, cred->rcache))) { + *minor_status = code; + return(GSS_S_FAILURE); + } if ((code = krb5_rd_req(context, &auth_context, &ap_req, cred->princ, cred->keytab, NULL, &ticket))) { *minor_status = code; @@ -384,8 +392,7 @@ krb5_gss_accept_sec_context(minor_status, context_handle, ctx->mech_used = mech_used; ctx->auth_context = auth_context; ctx->initiate = 0; - ctx->gss_flags = GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG | - (gss_flags & (GSS_C_MUTUAL_FLAG | GSS_C_DELEG_FLAG)); + ctx->gss_flags = KG_IMPLFLAGS(gss_flags); ctx->seed_init = 0; ctx->big_endian = bigend; @@ -417,6 +424,29 @@ krb5_gss_accept_sec_context(minor_status, context_handle, return(GSS_S_FAILURE); } + /* use the session key if the subkey isn't present */ + + if (ctx->subkey == NULL) { + if ((code = krb5_auth_con_getkey(context, auth_context, + &ctx->subkey))) { + krb5_free_principal(context, ctx->there); + krb5_free_principal(context, ctx->here); + xfree(ctx); + *minor_status = code; + return(GSS_S_FAILURE); + } + } + + if (ctx->subkey == NULL) { + krb5_free_principal(context, ctx->there); + krb5_free_principal(context, ctx->here); + xfree(ctx); + /* this isn't a very good error, but it's not clear to me this + can actually happen */ + *minor_status = KRB5KDC_ERR_NULL_KEY; + return(GSS_S_FAILURE); + } + switch(ctx->subkey->enctype) { case ENCTYPE_DES_CBC_MD5: case ENCTYPE_DES_CBC_CRC: @@ -464,7 +494,7 @@ krb5_gss_accept_sec_context(minor_status, context_handle, } ctx->endtime = ticket->enc_part2->times.endtime; - ctx->flags = ticket->enc_part2->flags; + ctx->krb_flags = ticket->enc_part2->flags; krb5_free_ticket(context, ticket); /* Done with ticket */ @@ -487,8 +517,8 @@ krb5_gss_accept_sec_context(minor_status, context_handle, } g_order_init(&(ctx->seqstate), ctx->seq_recv, - (gss_flags & GSS_C_REPLAY_FLAG) != 0, - (gss_flags & GSS_C_SEQUENCE_FLAG) != 0); + (ctx->gss_flags & GSS_C_REPLAY_FLAG) != 0, + (ctx->gss_flags & GSS_C_SEQUENCE_FLAG) != 0); /* at this point, the entire context structure is filled in, so it can be released. */ @@ -545,7 +575,7 @@ krb5_gss_accept_sec_context(minor_status, context_handle, *time_rec = ctx->endtime - now; if (ret_flags) - *ret_flags = KG_IMPLFLAGS(gss_flags); + *ret_flags = ctx->gss_flags; ctx->established = 1; diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c index 06acb8877..91f882a7b 100644 --- a/src/lib/gssapi/krb5/acquire_cred.c +++ b/src/lib/gssapi/krb5/acquire_cred.c @@ -118,6 +118,15 @@ acquire_accept_cred(context, minor_status, desired_name, output_princ, cred) /* hooray. we made it */ cred->keytab = kt; + + /* Open the replay cache for this principal. */ + if ((code = krb5_get_server_rcache(context, + krb5_princ_component(context, princ, 0), + &cred->rcache))) { + *minor_status = code; + return(GSS_S_FAILURE); + } + return(GSS_S_COMPLETE); } diff --git a/src/lib/gssapi/krb5/delete_sec_context.c b/src/lib/gssapi/krb5/delete_sec_context.c index b38dfbed5..f991bdbcf 100644 --- a/src/lib/gssapi/krb5/delete_sec_context.c +++ b/src/lib/gssapi/krb5/delete_sec_context.c @@ -92,8 +92,10 @@ krb5_gss_delete_sec_context(minor_status, context_handle, output_token) krb5_free_principal(context, ctx->there); krb5_free_keyblock(context, ctx->subkey); - if (ctx->auth_context) + if (ctx->auth_context) { + (void)krb5_auth_con_setrcache(context, ctx->auth_context, NULL); krb5_auth_con_free(context, ctx->auth_context); + } if (ctx->mech_used) gss_release_oid(minor_status, &ctx->mech_used); diff --git a/src/lib/gssapi/krb5/get_tkt_flags.c b/src/lib/gssapi/krb5/get_tkt_flags.c index 5dd91064f..eebf06d81 100644 --- a/src/lib/gssapi/krb5/get_tkt_flags.c +++ b/src/lib/gssapi/krb5/get_tkt_flags.c @@ -48,7 +48,7 @@ gss_krb5_get_tkt_flags(minor_status, context_handle, ticket_flags) } if (ticket_flags) - *ticket_flags = ctx->flags; + *ticket_flags = ctx->krb_flags; *minor_status = 0; return(GSS_S_COMPLETE); diff --git a/src/lib/gssapi/krb5/gssapiP_krb5.h b/src/lib/gssapi/krb5/gssapiP_krb5.h index ee327baf6..fa1e9ce8f 100644 --- a/src/lib/gssapi/krb5/gssapiP_krb5.h +++ b/src/lib/gssapi/krb5/gssapiP_krb5.h @@ -91,6 +91,7 @@ typedef struct _krb5_gss_cred_id_rec { /* ccache (init) data */ krb5_ccache ccache; krb5_timestamp tgt_expire; + krb5_rcache rcache; } krb5_gss_cred_id_rec, *krb5_gss_cred_id_t; typedef struct _krb5_gss_enc_desc { @@ -113,7 +114,7 @@ typedef struct _krb5_gss_ctx_id_rec { krb5_gss_enc_desc enc; krb5_gss_enc_desc seq; krb5_timestamp endtime; - krb5_flags flags; + krb5_flags krb_flags; krb5_int32 seq_send; krb5_int32 seq_recv; void *seqstate; diff --git a/src/lib/gssapi/krb5/init_sec_context.c b/src/lib/gssapi/krb5/init_sec_context.c index 690d5af2b..182170832 100644 --- a/src/lib/gssapi/krb5/init_sec_context.c +++ b/src/lib/gssapi/krb5/init_sec_context.c @@ -30,15 +30,15 @@ static krb5_error_code make_ap_req(context, auth_context, cred, server, endtime, chan_bindings, - req_flags, flags, mech_type, token) + req_flags, krb_flags, mech_type, token) krb5_context context; krb5_auth_context * auth_context; krb5_gss_cred_id_t cred; krb5_principal server; krb5_timestamp *endtime; gss_channel_bindings_t chan_bindings; - OM_uint32 req_flags; - krb5_flags *flags; + OM_uint32 *req_flags; + krb5_flags *krb_flags; gss_OID mech_type; gss_buffer_t token; { @@ -74,8 +74,7 @@ make_ap_req(context, auth_context, cred, server, endtime, chan_bindings, /* build the checksum field */ - if(*flags && GSS_C_DELEG_FLAG) { - + if (*req_flags & GSS_C_DELEG_FLAG) { /* first get KRB_CRED message, so we know its length */ /* clear the time check flag that was set in krb5_auth_con_init() */ @@ -83,20 +82,27 @@ make_ap_req(context, auth_context, cred, server, endtime, chan_bindings, krb5_auth_con_setflags(context, *auth_context, con_flags & ~KRB5_AUTH_CONTEXT_DO_TIME); - if ((code = krb5_fwd_tgt_creds(context, *auth_context, 0, + code = krb5_fwd_tgt_creds(context, *auth_context, 0, cred->princ, server, cred->ccache, 1, - &credmsg))) - return(code); + &credmsg); /* turn KRB5_AUTH_CONTEXT_DO_TIME back on */ krb5_auth_con_setflags(context, *auth_context, con_flags); - if(credmsg.length+28 > KRB5_INT16_MAX) { - krb5_xfree(credmsg.data); - return(KRB5KRB_ERR_FIELD_TOOLONG); - } + if (code) { + /* don't fail here; just don't accept/do the delegation + request */ + *req_flags &= ~GSS_C_DELEG_FLAG; - checksum_data.length = 28+credmsg.length; + checksum_data.length = 24; + } else { + if (credmsg.length+28 > KRB5_INT16_MAX) { + krb5_xfree(credmsg.data); + return(KRB5KRB_ERR_FIELD_TOOLONG); + } + + checksum_data.length = 28+credmsg.length; + } } else { checksum_data.length = 24; } @@ -115,7 +121,7 @@ make_ap_req(context, auth_context, cred, server, endtime, chan_bindings, TWRITE_INT(ptr, md5.length, 0); TWRITE_STR(ptr, (unsigned char *) md5.contents, md5.length); - TWRITE_INT(ptr, KG_IMPLFLAGS(req_flags), 0); + TWRITE_INT(ptr, *req_flags, 0); /* done with this, free it */ xfree(md5.contents); @@ -151,7 +157,7 @@ make_ap_req(context, auth_context, cred, server, endtime, chan_bindings, mk_req_flags = AP_OPTS_USE_SUBKEY; - if (req_flags & GSS_C_MUTUAL_FLAG) + if (*req_flags & GSS_C_MUTUAL_FLAG) mk_req_flags |= AP_OPTS_MUTUAL_REQUIRED; if ((code = krb5_mk_req_extended(context, auth_context, mk_req_flags, @@ -160,7 +166,7 @@ make_ap_req(context, auth_context, cred, server, endtime, chan_bindings, /* store the interesting stuff from creds and authent */ *endtime = out_creds->times.endtime; - *flags = out_creds->ticket_flags; + *krb_flags = out_creds->ticket_flags; /* build up the token */ @@ -264,15 +270,15 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, err = 0; if (mech_type == GSS_C_NULL_OID) { - mech_type = cred->rfc_mech?gss_mech_krb5:gss_mech_krb5_old; - } else if (g_OID_equal(mech_type, gss_mech_krb5)) { - if (!cred->rfc_mech) - err = 1; - } else if (g_OID_equal(mech_type, gss_mech_krb5_old)) { - if (!cred->prerfc_mech) - err = 1; - } else - err = 1; + mech_type = cred->rfc_mech?gss_mech_krb5:gss_mech_krb5_old; + } else if (g_OID_equal(mech_type, gss_mech_krb5)) { + if (!cred->rfc_mech) + err = 1; + } else if (g_OID_equal(mech_type, gss_mech_krb5_old)) { + if (!cred->prerfc_mech) + err = 1; + } else + err = 1; if (err) { *minor_status = 0; @@ -298,9 +304,9 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, return(GSS_S_NO_CRED); } - /* complain if the input token is nonnull */ + /* complain if the input token is non-null */ - if (input_token != GSS_C_NO_BUFFER) { + if (input_token != GSS_C_NO_BUFFER && input_token->length != 0) { *minor_status = 0; return(GSS_S_DEFECTIVE_TOKEN); } @@ -318,9 +324,7 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, ctx->mech_used = mech_type; ctx->auth_context = NULL; ctx->initiate = 1; - ctx->gss_flags = ((req_flags & (GSS_C_MUTUAL_FLAG | GSS_C_DELEG_FLAG)) | - GSS_C_CONF_FLAG | GSS_C_INTEG_FLAG); - ctx->flags = req_flags & GSS_C_DELEG_FLAG; + ctx->gss_flags = KG_IMPLFLAGS(req_flags); ctx->seed_init = 0; ctx->big_endian = 0; /* all initiators do little-endian, as per spec */ ctx->seqstate = 0; @@ -352,7 +356,8 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, if ((code = make_ap_req(context, &(ctx->auth_context), cred, ctx->there, &ctx->endtime, input_chan_bindings, - req_flags, &ctx->flags, mech_type, &token))) { + &ctx->gss_flags, &ctx->krb_flags, mech_type, + &token))) { krb5_free_principal(context, ctx->here); krb5_free_principal(context, ctx->there); xfree(ctx); @@ -438,7 +443,7 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, *output_token = token; if (ret_flags) - *ret_flags = KG_IMPLFLAGS(req_flags); + *ret_flags = ctx->gss_flags; if (actual_mech_type) *actual_mech_type = mech_type; @@ -452,8 +457,8 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, } else { ctx->seq_recv = ctx->seq_send; g_order_init(&(ctx->seqstate), ctx->seq_recv, - (req_flags & GSS_C_REPLAY_FLAG) != 0, - (req_flags & GSS_C_SEQUENCE_FLAG) != 0); + (ctx->gss_flags & GSS_C_REPLAY_FLAG) != 0, + (ctx->gss_flags & GSS_C_SEQUENCE_FLAG) != 0); ctx->established = 1; /* fall through to GSS_S_COMPLETE */ } @@ -477,7 +482,7 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, if ((ctx->established) || (((gss_cred_id_t) cred) != claimant_cred_handle) || - ((req_flags & GSS_C_MUTUAL_FLAG) == 0)) { + ((ctx->gss_flags & GSS_C_MUTUAL_FLAG) == 0)) { (void)krb5_gss_delete_sec_context(minor_status, context_handle, NULL); /* XXX this minor status is wrong if an arg was changed */ @@ -534,8 +539,8 @@ krb5_gss_init_sec_context(minor_status, claimant_cred_handle, /* store away the sequence number */ ctx->seq_recv = ap_rep_data->seq_number; g_order_init(&(ctx->seqstate), ctx->seq_recv, - (req_flags & GSS_C_REPLAY_FLAG) != 0, - (req_flags & GSS_C_SEQUENCE_FLAG) !=0); + (ctx->gss_flags & GSS_C_REPLAY_FLAG) != 0, + (ctx->gss_flags & GSS_C_SEQUENCE_FLAG) !=0); /* free the ap_rep_data */ krb5_free_ap_rep_enc_part(context, ap_rep_data); diff --git a/src/lib/gssapi/krb5/rel_cred.c b/src/lib/gssapi/krb5/rel_cred.c index df301987b..0d81399af 100644 --- a/src/lib/gssapi/krb5/rel_cred.c +++ b/src/lib/gssapi/krb5/rel_cred.c @@ -29,7 +29,7 @@ krb5_gss_release_cred(minor_status, cred_handle) { krb5_context context; krb5_gss_cred_id_t cred; - krb5_error_code code1, code2; + krb5_error_code code1, code2, code3; if (GSS_ERROR(kg_get_context(minor_status, &context))) return(GSS_S_FAILURE); @@ -54,6 +54,10 @@ krb5_gss_release_cred(minor_status, cred_handle) else code2 = 0; + if (cred->rcache) + code3 = krb5_rc_close(context, cred->rcache); + else + code3 = 0; if (cred->princ) krb5_free_principal(context, cred->princ); xfree(cred); @@ -65,6 +69,8 @@ krb5_gss_release_cred(minor_status, cred_handle) *minor_status = code1; if (code2) *minor_status = code2; + if (code3) + *minor_status = code3; return(*minor_status?GSS_S_FAILURE:GSS_S_COMPLETE); } diff --git a/src/lib/gssapi/krb5/ser_sctx.c b/src/lib/gssapi/krb5/ser_sctx.c index 259cce5b8..22b5c367c 100644 --- a/src/lib/gssapi/krb5/ser_sctx.c +++ b/src/lib/gssapi/krb5/ser_sctx.c @@ -515,7 +515,7 @@ kg_ctx_externalize(kcontext, arg, buffer, lenremain) &bp, &remain); (void) krb5_ser_pack_int32((krb5_int32) ctx->endtime, &bp, &remain); - (void) krb5_ser_pack_int32((krb5_int32) ctx->flags, + (void) krb5_ser_pack_int32((krb5_int32) ctx->krb_flags, &bp, &remain); (void) krb5_ser_pack_int32((krb5_int32) ctx->seq_send, &bp, &remain); @@ -632,7 +632,7 @@ kg_ctx_internalize(kcontext, argp, buffer, lenremain) (void) krb5_ser_unpack_int32(&ibuf, &bp, &remain); ctx->endtime = (krb5_timestamp) ibuf; (void) krb5_ser_unpack_int32(&ibuf, &bp, &remain); - ctx->flags = (krb5_flags) ibuf; + ctx->krb_flags = (krb5_flags) ibuf; (void) krb5_ser_unpack_int32(&ctx->seq_send, &bp, &remain); (void) krb5_ser_unpack_int32(&ctx->seq_recv, &bp, &remain); (void) krb5_ser_unpack_int32(&ibuf, &bp, &remain); diff --git a/src/lib/gssapi/krb5/wrap_size_limit.c b/src/lib/gssapi/krb5/wrap_size_limit.c index 8c47d0fa6..e883efde1 100644 --- a/src/lib/gssapi/krb5/wrap_size_limit.c +++ b/src/lib/gssapi/krb5/wrap_size_limit.c @@ -68,8 +68,14 @@ krb5_gss_wrap_size_limit(minor_status, context_handle, conf_req_flag, ohlen = g_token_size((gss_OID) ctx->mech_used, (unsigned int) cfsize + ctx->cksum_size + 14); - /* Cannot have trailer length that will cause us to pad over our length */ - *max_input_size = (req_output_size - ohlen) & (~7); + if (ohlen < req_output_size) + /* + * Cannot have trailer length that will cause us to pad over + * our length + */ + *max_input_size = (req_output_size - ohlen) & (~7); + else + *max_input_size = 0; *minor_status = 0; return(GSS_S_COMPLETE); } diff --git a/src/lib/gssapi/mechglue/ChangeLog b/src/lib/gssapi/mechglue/ChangeLog index 97558b1a2..9f8fb1bc4 100644 --- a/src/lib/gssapi/mechglue/ChangeLog +++ b/src/lib/gssapi/mechglue/ChangeLog @@ -1,3 +1,7 @@ +Mon Nov 18 20:43:54 1996 Ezra Peisach + + * configure.in: Shared library version number to 1.0. [krb5-libs/201] + Wed Jun 12 00:50:32 1996 Theodore Ts'o * Makefile.in: Remove include of config/windows.in; that's done diff --git a/src/lib/gssapi/mechglue/configure.in b/src/lib/gssapi/mechglue/configure.in index 73cf30efd..bd9b4db21 100644 --- a/src/lib/gssapi/mechglue/configure.in +++ b/src/lib/gssapi/mechglue/configure.in @@ -13,7 +13,7 @@ case $host in *-*-aix*) # don't build libgssapi.a on AIX ;; *) - V5_MAKE_SHARED_LIB(libgssapi,0.1,.., ./mechglue) + V5_MAKE_SHARED_LIB(libgssapi,1.0,.., ./mechglue) AppendRule([install:: libgssapi.[$](LIBEXT) [$](INSTALL_DATA) libgssapi.[$](LIBEXT) [$](DESTDIR)[$](KRB5_LIBDIR)[$](S)libgssapi.[$](LIBEXT)]) LinkFileDir([$](TOPLIBD)/libgssapi.[$](LIBEXT),libgssapi.[$](LIBEXT),./gssapi/mechglue) diff --git a/src/lib/kadm5/srv/ChangeLog b/src/lib/kadm5/srv/ChangeLog index 9a08922a5..b3844d865 100644 --- a/src/lib/kadm5/srv/ChangeLog +++ b/src/lib/kadm5/srv/ChangeLog @@ -1,3 +1,20 @@ +Sun Mar 9 13:40:33 1997 Tom Yu + + * svr_principal.c (add_to_history): Don't call realloc() on a NULL + pointer, lest non-ANSI compliant systems like SunOS fail. + +Tue Nov 26 03:04:04 1996 Sam Hartman + + * server_acl.c (acl_load_acl_file): Fix coredump by allowing + catchall_entry to be null, but do not reference it if it is. + Thanks to marc. [242] + +Mon Nov 25 17:53:20 1996 Barry Jaspan + + * server_acl.c: set acl_catchall_entry to "" instead of NULL, + since it is presumed to contain something, but we don't want any + default entry [krb5-admin/237] + Wed Nov 13 19:20:36 1996 Tom Yu * Makefile.in (clean-unix): Remove shared/*. diff --git a/src/lib/kadm5/srv/server_acl.c b/src/lib/kadm5/srv/server_acl.c index 16a7f4e40..3e731fe3e 100644 --- a/src/lib/kadm5/srv/server_acl.c +++ b/src/lib/kadm5/srv/server_acl.c @@ -276,7 +276,8 @@ char tmpbuf[10]; } else { com_err(acl_acl_file, errno, acl_cantopen_msg); - if (acl_list_head = acl_parse_line(acl_catchall_entry)) { + if (acl_catchall_entry && + (acl_list_head = acl_parse_line(acl_catchall_entry))) { acl_list_tail = acl_list_head; } else { diff --git a/src/lib/kadm5/srv/svr_principal.c b/src/lib/kadm5/srv/svr_principal.c index f4a21f39a..5ff1b4976 100644 --- a/src/lib/kadm5/srv/svr_principal.c +++ b/src/lib/kadm5/srv/svr_principal.c @@ -964,9 +964,14 @@ static kadm5_ret_t add_to_history(krb5_context context, /* resize the adb->old_keys array if necessary */ if (adb->old_key_len < pol->pw_history_num-1) { - adb->old_keys = (osa_pw_hist_ent *) - realloc(adb->old_keys, - (adb->old_key_len+1)*sizeof(osa_pw_hist_ent)); + if (adb->old_keys == NULL) { + adb->old_keys = (osa_pw_hist_ent *) + malloc((adb->old_key_len + 1) * sizeof (osa_pw_hist_ent)); + } else { + adb->old_keys = (osa_pw_hist_ent *) + realloc(adb->old_keys, + (adb->old_key_len + 1) * sizeof (osa_pw_hist_ent)); + } if (adb->old_keys == NULL) return(ENOMEM); diff --git a/src/lib/kadm5/unit-test/ChangeLog b/src/lib/kadm5/unit-test/ChangeLog index aba10a90e..d169ba89e 100644 --- a/src/lib/kadm5/unit-test/ChangeLog +++ b/src/lib/kadm5/unit-test/ChangeLog @@ -1,3 +1,7 @@ +Wed Nov 20 15:59:34 1996 Barry Jaspan + + * Makefile.in (check-): warn more loudly about unrun tests + Mon Nov 11 20:51:27 1996 Tom Yu * configure.in: Add AC_CANONICAL_HOST to deal with new pre.in. diff --git a/src/lib/kadm5/unit-test/Makefile.in b/src/lib/kadm5/unit-test/Makefile.in index 455f42880..333c663e5 100644 --- a/src/lib/kadm5/unit-test/Makefile.in +++ b/src/lib/kadm5/unit-test/Makefile.in @@ -49,7 +49,10 @@ server-iter-test: iter-test.o $(SRVDEPLIBS) check:: check-@DO_TEST@ check-:: - @echo "Either tcl, runtest, or Perl is unavailable. Kadm5 unit tests not run" + @echo "+++" + @echo "+++ WARNING: lib/kadm5 unit tests not run." + @echo "+++ Either tcl, runtest, or Perl is unavailable." + @echo "+++" check-ok unit-test:: unit-test-client unit-test-server diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index 3f74707fb..f31fb7a9d 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,13 @@ +Sun Mar 16 21:20:00 1997 Tom Yu + + * keytab.c: Don't assume dbm_db_get_mkey() and dbe_find_enctype + won't error out. Also, some gcc -Wall warning + cleanups. [krb5-kdc/361] + +Mon Nov 18 20:40:12 1996 Ezra Peisach + + * configure.in: Set shared library version to 1.0. [krb5-libs/201] + Tue Nov 12 23:41:55 1996 Mark Eichin * kdb_dbm.c: Ditch DB_OPENCLOSE conditionals, and fix the real diff --git a/src/lib/kdb/configure.in b/src/lib/kdb/configure.in index 75c4e40c8..8f04d9824 100644 --- a/src/lib/kdb/configure.in +++ b/src/lib/kdb/configure.in @@ -20,7 +20,7 @@ KRB5_RUN_FLAGS V5_USE_SHARED_LIB KRB5_LIBRARIES V5_SHARED_LIB_OBJS -V5_MAKE_SHARED_LIB(libkdb5,0.1,.., ./kdb) +V5_MAKE_SHARED_LIB(libkdb5,1.0,.., ./kdb) AppendRule([all-unix:: ../libkdb5.a]) KRB5_SH_VERS=$krb5_cv_shlib_version_libkrb5 AC_SUBST(KRB5_SH_VERS) diff --git a/src/lib/kdb/keytab.c b/src/lib/kdb/keytab.c index c32b74217..82ed08e33 100644 --- a/src/lib/kdb/keytab.c +++ b/src/lib/kdb/keytab.c @@ -110,35 +110,44 @@ krb5_ktkdb_get_entry(context, id, principal, kvno, enctype, entry) /* Open database */ /* krb5_dbm_db_init(context); */ - if (kerror = krb5_dbm_db_open_database(context)) + if ((kerror = krb5_dbm_db_open_database(context))) return(kerror); /* get_principal */ - if (kerror = krb5_dbm_db_get_principal(context, principal, &db_entry, - &n, &more)) { + kerror = krb5_dbm_db_get_principal(context, principal, & + db_entry, &n, &more); + if (kerror) { krb5_dbm_db_close_database(context); return(kerror); } - - if (n != 1) - { + if (n != 1) { krb5_dbm_db_close_database(context); return KRB5_KT_NOTFOUND; - } + } + /* match key */ - krb5_dbm_db_get_mkey(context, id->ops, &master_key); - krb5_dbe_find_enctype(context, &db_entry, enctype, -1, kvno, &key_data); - if (kerror = krb5_dbekd_decrypt_key_data(context, master_key, key_data, - &entry->key, NULL)) + /* WTF??? 2nd arg to dbm_db_get_mkey appears to be unused! -tlyu */ + kerror = krb5_dbm_db_get_mkey(context, id->ops, &master_key); + if (kerror) + goto error; + + kerror = krb5_dbe_find_enctype(context, &db_entry, + enctype, -1, kvno, &key_data); + if (kerror) + goto error; + + kerror = krb5_dbekd_decrypt_key_data(context, master_key, + key_data, &entry->key, NULL); + if (kerror) goto error; - if (kerror = krb5_copy_principal(context, principal, &entry->principal)) + kerror = krb5_copy_principal(context, principal, &entry->principal); + if (kerror) goto error; /* Close database */ -error:; + error: krb5_dbe_free_contents(context, &db_entry); krb5_dbm_db_close_database(context); return(kerror); } - diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 27ab65fe1..7c14e7102 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,16 @@ +Wed Apr 9 23:15:39 1997 Tom Yu + + * realmofhost.c (krb_realmofhost): Add bounds checking to various + things. + + * g_krbhst.c (krb_get_krbhst): Fix to bound fscanf and sscanf. + + * g_krbrlm.c (krb_get_lrealm): Fix to bound fscanf. + +Mon Nov 18 20:40:39 1996 Ezra Peisach + + * configure.in: Set shared library version to 1.0. [krb5-libs/201] + Thu Nov 7 12:33:06 1996 Theodore Y. Ts'o * g_in_tkt.c: diff --git a/src/lib/krb4/configure.in b/src/lib/krb4/configure.in index 4e3dd8c0f..2a4c8b3a7 100644 --- a/src/lib/krb4/configure.in +++ b/src/lib/krb4/configure.in @@ -44,7 +44,7 @@ AC_HAVE_FUNCS(strsave seteuid setreuid setresuid) AC_PROG_AWK V5_SHARED_LIB_OBJS SubdirLibraryRule([$(OBJS)]) -V5_MAKE_SHARED_LIB(libkrb4,0.1,.., ./krb4) +V5_MAKE_SHARED_LIB(libkrb4,1.0,.., ./krb4) CopyHeader(krb_err.h,$(EHDRDIR)) CRYPTO_SH_VERS=$krb5_cv_shlib_version_libcrypto AC_SUBST(CRYPTO_SH_VERS) diff --git a/src/lib/krb4/g_krbhst.c b/src/lib/krb4/g_krbhst.c index eaab28928..ef97d39d0 100644 --- a/src/lib/krb4/g_krbhst.c +++ b/src/lib/krb4/g_krbhst.c @@ -75,7 +75,7 @@ krb_get_krbhst(h,r,n) cnffile = krb__get_cnffile(); if (!cnffile) return get_krbhst_default(h, r, n); - if (fscanf(cnffile,"%s",tr) == EOF) + if (fscanf(cnffile,"%39s",tr) == EOF) /* XXX assumes REALM_SZ == 40 */ return get_krbhst_default(h, r, n); /* run through the file, looking for the nth server for this realm */ for (i = 1; i <= n;) { @@ -83,7 +83,7 @@ krb_get_krbhst(h,r,n) (void) fclose(cnffile); return get_krbhst_default(h, r, n); } - if (sscanf(linebuf, "%s %s", tr, h) != 2) + if (sscanf(linebuf, "%39s %1023s", tr, h) != 2) /* REALM_SZ == 40 */ continue; if (!strcmp(tr,r)) i++; diff --git a/src/lib/krb4/g_krbrlm.c b/src/lib/krb4/g_krbrlm.c index f83beba36..6896c2a31 100644 --- a/src/lib/krb4/g_krbrlm.c +++ b/src/lib/krb4/g_krbrlm.c @@ -51,7 +51,11 @@ krb_get_lrealm(r,n) return(KFAILURE); } - if (fscanf(cnffile,"%s",r) != 1) { + /* + * XXX This assumes REALM_SZ == 40, + * and that r is 40 characters long. + */ + if (fscanf(cnffile,"%39s",r) != 1) { (void) fclose(cnffile); return(KFAILURE); } diff --git a/src/lib/krb4/realmofhost.c b/src/lib/krb4/realmofhost.c index cff11cc8e..e4529d53a 100644 --- a/src/lib/krb4/realmofhost.c +++ b/src/lib/krb4/realmofhost.c @@ -48,7 +48,11 @@ char *host; char *domain; FILE *trans_file; FILE *krb__get_realmsfile(); - char trans_host[MAXHOSTNAMELEN+1]; + /* + * This used to be MAXHOSTNAMELEN, but we don't know how big + * that will necessarily be on all systems, so assume 1024. + */ + char trans_host[1025]; char trans_realm[REALM_SZ+1]; int retval; struct hostent *h; @@ -111,24 +115,28 @@ char *host; /* loop while not exact match, and more entries to read */ while (1) { - if ((retval = fscanf(trans_file, "%s %s", + /* XXX REALM_SZ == 40 */ + if ((retval = fscanf(trans_file, "%1023s %40s", trans_host, trans_realm)) != 2) { if (retval == EOF) break; continue; /* ignore broken lines */ } - trans_host[MAXHOSTNAMELEN] = '\0'; + trans_host[(MAXHOSTNAMELEN <= 1023) ? MAXHOSTNAMELEN : 1023] + = '\0'; trans_realm[REALM_SZ] = '\0'; if (trans_host[0] == '.') { /* want domain match only */ - if (domain && !strcasecmp (trans_host, domain)) { + if (domain && (strlen(trans_host) == strlen(domain)) + && !strcasecmp (trans_host, domain)) { /* got domain match, save for later */ (void) strcpy (ret_realm, trans_realm); continue; } } else { /* want exact match of hostname */ - if (!strcasecmp (trans_host, lhost)) { + if ((strlen(lhost) == strlen(trans_host)) && + !strcasecmp (trans_host, lhost)) { (void) strcpy (ret_realm, trans_realm); break; } diff --git a/src/lib/krb5/ChangeLog b/src/lib/krb5/ChangeLog index 00b17c7d8..e77f6b970 100644 --- a/src/lib/krb5/ChangeLog +++ b/src/lib/krb5/ChangeLog @@ -1,3 +1,7 @@ +Mon Nov 18 20:42:39 1996 Ezra Peisach + + * configure.in: Set shared library version to 1.0. [krb5-libs/201] + Wed Oct 23 01:15:40 1996 Theodore Y. Ts'o * configure.in, Makefile.in: Check to see if the -lgen library diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index 8aa3684e2..ff28d4191 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,8 @@ +Wed Jan 14 20:57:33 1998 Tom Yu + + * asn1buf.c (asn12krb5_buf): Check return value of + calloc. [krb5-libs/518] + Thu Nov 14 20:57:55 1996 Theodore Y. Ts'o * asn1_k_encode.c (asn1_encode_principal_name): Be liberal about diff --git a/src/lib/krb5/asn.1/asn1buf.c b/src/lib/krb5/asn.1/asn1buf.c index 822b26377..b257d20e2 100644 --- a/src/lib/krb5/asn.1/asn1buf.c +++ b/src/lib/krb5/asn.1/asn1buf.c @@ -231,6 +231,10 @@ asn1_error_code asn12krb5_buf(buf, code) (*code)->length = 0; (*code)->length = asn1buf_len(buf); (*code)->data = (char*)calloc(((*code)->length)+1,sizeof(char)); + if ((*code)->data == NULL) { + free(*code); + return ENOMEM; + } for(i=0; i < (*code)->length; i++) ((*code)->data)[i] = (buf->base)[((*code)->length)-i-1]; ((*code)->data)[(*code)->length] = '\0'; diff --git a/src/lib/krb5/configure.in b/src/lib/krb5/configure.in index c612ed7c9..2ac53bdfe 100644 --- a/src/lib/krb5/configure.in +++ b/src/lib/krb5/configure.in @@ -16,7 +16,7 @@ dnl AC_CHECK_LIB(gen,compile,SHLIB_GEN=-lgen,SHLIB_GEN='') AC_SUBST(SHLIB_GEN) dnl -V5_MAKE_SHARED_LIB(libkrb5,0.1,.., ./krb5) +V5_MAKE_SHARED_LIB(libkrb5,1.0,.., ./krb5) CRYPTO_SH_VERS=$krb5_cv_shlib_version_libcrypto AC_SUBST(CRYPTO_SH_VERS) COMERR_SH_VERS=$krb5_cv_shlib_version_libcom_err diff --git a/src/lib/krb5/error_tables/ChangeLog b/src/lib/krb5/error_tables/ChangeLog index 0b60e42c5..6eff8a21a 100644 --- a/src/lib/krb5/error_tables/ChangeLog +++ b/src/lib/krb5/error_tables/ChangeLog @@ -1,3 +1,7 @@ +Tue Nov 19 17:06:26 1996 Barry Jaspan + + * krb5_err.et: add KRB5_KT_KVNONOTFOUND [krb5-libs/198] + Wed Nov 6 11:15:32 1996 Theodore Ts'o * krb5_err.et: Make the KRB5_CONFIG_CANTOPEN and diff --git a/src/lib/krb5/error_tables/krb5_err.et b/src/lib/krb5/error_tables/krb5_err.et index 06af95541..1b4223242 100644 --- a/src/lib/krb5/error_tables/krb5_err.et +++ b/src/lib/krb5/error_tables/krb5_err.et @@ -300,5 +300,6 @@ error_code KRB5_CONFIG_NODEFREALM, "Configuration file does not specify default error_code KRB5_SAM_UNSUPPORTED, "Bad SAM flags in obtain_sam_padata" error_code KRB5_KT_NAME_TOOLONG, "Keytab name too long" +error_code KRB5_KT_KVNONOTFOUND, "Key version number for principal in key table is incorrect" end diff --git a/src/lib/krb5/keytab/file/ChangeLog b/src/lib/krb5/keytab/file/ChangeLog index c37f70950..f14e2a030 100644 --- a/src/lib/krb5/keytab/file/ChangeLog +++ b/src/lib/krb5/keytab/file/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 19 17:06:59 1996 Barry Jaspan + + * ktf_g_ent.c (krb5_ktfile_get_entry): return KRB5_KT_KVNONOTFOUND + when appropriate [krb5-libs/198] + Wed Jul 24 17:10:11 1996 Theodore Y. Ts'o * ktf_g_name.c (krb5_ktfile_get_name): Use the error code diff --git a/src/lib/krb5/keytab/file/ktf_g_ent.c b/src/lib/krb5/keytab/file/ktf_g_ent.c index 4805d5c69..e42dcdbd4 100644 --- a/src/lib/krb5/keytab/file/ktf_g_ent.c +++ b/src/lib/krb5/keytab/file/ktf_g_ent.c @@ -40,6 +40,7 @@ krb5_ktfile_get_entry(context, id, principal, kvno, enctype, entry) { krb5_keytab_entry cur_entry, new_entry; krb5_error_code kerror = 0; + int found_wrong_kvno = 0; /* Open the keyfile for reading */ if ((kerror = krb5_ktfileint_openr(context, id))) @@ -92,14 +93,21 @@ krb5_ktfile_get_entry(context, id, principal, kvno, enctype, entry) krb5_kt_free_entry(context, &cur_entry); cur_entry = new_entry; break; - } + } else + found_wrong_kvno++; } } else { krb5_kt_free_entry(context, &new_entry); } } - if (kerror == KRB5_KT_END) - kerror = cur_entry.principal ? 0 : KRB5_KT_NOTFOUND; + if (kerror == KRB5_KT_END) { + if (cur_entry.principal) + kerror = 0; + else if (found_wrong_kvno) + kerror = KRB5_KT_KVNONOTFOUND; + else + kerror = KRB5_KT_NOTFOUND; + } if (kerror) { (void) krb5_ktfileint_close(context, id); krb5_kt_free_entry(context, &cur_entry); diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index c702d0aa9..38aea85ee 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,47 @@ +Wed Jan 14 20:58:52 1998 Tom Yu + + * preauth.c (handle_sam_labels): Check return value of + malloc. [krb5-libs/518] + +Wed Oct 22 00:29:33 1997 Theodore Y. Ts'o + + * send_tgs.c (krb5_send_tgs): Don't send a zero endtime; if the + requested endtime is zero, set it equal to the TGT endtime. + +Sat Dec 21 01:26:11 1996 Theodore Y. Ts'o + + * brand.c: New file, which allows a release engineer to "brand" + the krb5 library or a binary application program + statically linked against the krb5 library. This file is + statically included by init_ctx.c, to force it be in a + binary library or application program. + +Tue Mar 25 00:32:55 1997 Theodore Y. Ts'o + + * preauth.c (obtain_sam_padata): Fix handling of the sam-timestamp + and sam-usec fields, which should always be set if the + nonce is not available, not just SAM_USE_SAD_AS_KEY is + being used. [krb5-libs/325] + +Wed Feb 12 20:47:30 1997 Tom Yu + + * fwd_tgt.c (krb5_fwd_tgt_creds): Use the client's realm rather + than the server's realm for constructing the tgs principal. + Remove TC_MATCH_SRV_NAMEONLY from call to retrieve_cred() because + we want to get an exact match. + +Tue Apr 8 10:31:30 1997 Theodore Ts'o + + * sendauth.c (krb5_sendauth): Don't free credspout if it is to be + returned in out_creds (#PR 357) + +Thu Nov 21 13:54:01 1996 Ezra Peisach + + * recvauth.c (krb5_recvauth): If there is an error, and the server + argument to krb5_recvauth is NULL, create a dummy server + entry for the krb5_error structure so that krb5_mk_error + will not die with missing required fields. [krb5-libs/209] + Wed Nov 13 14:30:47 1996 Tom Yu * init_ctx.c: Revert previous kt_default_name changes. diff --git a/src/lib/krb5/krb/brand.c b/src/lib/krb5/krb/brand.c new file mode 100644 index 000000000..de48d5880 --- /dev/null +++ b/src/lib/krb5/krb/brand.c @@ -0,0 +1,15 @@ +/* + * This file is used to put a "release brand" on a Krb5 library before + * it is released via some release engineering process. This gives us + * an easy way to tell where a binary came from. + * + * It currently is manually maintained, because there's no good way to + * automatically have CVS do the right thing. We could put RCS tags + * in every single file, but that (a) takes up lots of space, since we + * have lots of files in the Kerberos library, and (b) it makes CVS + * merges a real pain. + */ + +/* Format: "KRB5_BRAND: " */ + +static char krb5_brand[] = "KRB5_BRAND: Unbranded release"; diff --git a/src/lib/krb5/krb/fwd_tgt.c b/src/lib/krb5/krb/fwd_tgt.c index 6e10ad2ee..5fe226bfd 100644 --- a/src/lib/krb5/krb/fwd_tgt.c +++ b/src/lib/krb5/krb/fwd_tgt.c @@ -77,8 +77,8 @@ krb5_fwd_tgt_creds(context, auth_context, rhost, client, server, cc, goto errout; if ((retval = krb5_build_principal_ext(context, &creds.server, - server->realm.length, - server->realm.data, + client->realm.length, + client->realm.data, KRB5_TGS_NAME_SIZE, KRB5_TGS_NAME, client->realm.length, @@ -93,8 +93,7 @@ krb5_fwd_tgt_creds(context, auth_context, rhost, client, server, cc, } /* fetch tgt directly from cache */ - retval = krb5_cc_retrieve_cred (context, cc, KRB5_TC_MATCH_SRV_NAMEONLY, - &creds, &tgt); + retval = krb5_cc_retrieve_cred (context, cc, 0, &creds, &tgt); if (retval) goto errout; diff --git a/src/lib/krb5/krb/preauth.c b/src/lib/krb5/krb/preauth.c index a5f593bfe..4689e3f67 100644 --- a/src/lib/krb5/krb/preauth.c +++ b/src/lib/krb5/krb/preauth.c @@ -470,10 +470,14 @@ char *handle_sam_labels(sc) p = prompt1 = malloc(label_len + strlen(sep1) + challenge_len + strlen(sep2) + prompt_len+ strlen(sep3) + 1); - strncpy(p, label, label_len); p += label_len; - strcpy(p, sep1); p += strlen(sep1); - strncpy(p, challenge, challenge_len); p += challenge_len; - strcpy(p, sep2); p += strlen(sep2); + if (p == NULL) + return NULL; + if (challenge_len) { + strncpy(p, label, label_len); p += label_len; + strcpy(p, sep1); p += strlen(sep1); + strncpy(p, challenge, challenge_len); p += challenge_len; + strcpy(p, sep2); p += strlen(sep2); + } strncpy(p, prompt, prompt_len); p += prompt_len; strcpy(p, sep3); /* p += strlen(sep3); */ return prompt1; @@ -518,11 +522,25 @@ obtain_sam_padata(context, in_padata, etype_info, def_enc_key, } enc_sam_response_enc.sam_nonce = sam_challenge->sam_nonce; + if (!sam_challenge->sam_nonce) { + retval = krb5_us_timeofday(context, + &enc_sam_response_enc.sam_timestamp, + &enc_sam_response_enc.sam_usec); + sam_response.sam_patimestamp = enc_sam_response_enc.sam_timestamp; + } + if (retval) + return retval; if (sam_challenge->sam_flags & KRB5_SAM_SEND_ENCRYPTED_SAD) { /* encrypt passcode in key by stuffing it here */ int pcsize = 256; char *passcode = malloc(pcsize+1); + if (passcode == NULL) + return ENOMEM; prompt = handle_sam_labels(sam_challenge); + if (prompt == NULL) { + free(passcode); + return ENOMEM; + } retval = krb5_read_password(context, prompt, 0, passcode, &pcsize); free(prompt); @@ -533,17 +551,9 @@ obtain_sam_padata(context, in_padata, etype_info, def_enc_key, enc_sam_response_enc.sam_passcode.data = passcode; enc_sam_response_enc.sam_passcode.length = pcsize; } else if (sam_challenge->sam_flags & KRB5_SAM_USE_SAD_AS_KEY) { - if (sam_challenge->sam_nonce) { - /* use nonce in the next AS request? */ - } else { - retval = krb5_us_timeofday(context, - &enc_sam_response_enc.sam_timestamp, - &enc_sam_response_enc.sam_usec); - sam_response.sam_patimestamp = enc_sam_response_enc.sam_timestamp; - } - if (retval) - return retval; prompt = handle_sam_labels(sam_challenge); + if (prompt == NULL) + return ENOMEM; retval = sam_get_pass_from_user(context, etype_info, key_proc, key_seed, request, &sam_use_key, prompt); diff --git a/src/lib/krb5/krb/recvauth.c b/src/lib/krb5/krb/recvauth.c index d6d6772de..d5e7b5fc5 100644 --- a/src/lib/krb5/krb/recvauth.c +++ b/src/lib/krb5/krb/recvauth.c @@ -57,6 +57,7 @@ krb5_recvauth(context, auth_context, krb5_rcache rcache = 0; krb5_octet response; krb5_data null_server; + int need_error_free = 0; /* * Zero out problem variable. If problem is set at the end of @@ -173,7 +174,14 @@ krb5_recvauth(context, auth_context, memset((char *)&error, 0, sizeof(error)); krb5_us_timeofday(context, &error.stime, &error.susec); - error.server = server; + if(server) + error.server = server; + else { + /* If this fails - ie. ENOMEM we are hosed + we cannot even send the error if we wanted to... */ + (void) krb5_parse_name(context, "????", &error.server); + need_error_free = 1; + } error.error = problem - ERROR_TABLE_BASE_krb5; if (error.error > 127) @@ -190,6 +198,9 @@ krb5_recvauth(context, auth_context, goto cleanup; } free(error.text.data); + if(need_error_free) + krb5_free_principal(context, error.server); + } else { outbuf.length = 0; outbuf.data = 0; diff --git a/src/lib/krb5/krb/send_tgs.c b/src/lib/krb5/krb/send_tgs.c index ac4e27735..3247c8eb5 100644 --- a/src/lib/krb5/krb/send_tgs.c +++ b/src/lib/krb5/krb/send_tgs.c @@ -199,7 +199,8 @@ krb5_send_tgs(context, kdcoptions, timestruct, ktypes, sname, addrs, tgsreq.server = (krb5_principal) sname; tgsreq.from = timestruct->starttime; - tgsreq.till = timestruct->endtime; + tgsreq.till = timestruct->endtime ? timestruct->endtime : + in_cred->times.endtime; tgsreq.rtime = timestruct->renew_till; if ((retval = krb5_timeofday(context, &time_now))) return(retval); diff --git a/src/lib/krb5/krb/sendauth.c b/src/lib/krb5/krb/sendauth.c index d77afdc9b..78183c7ac 100644 --- a/src/lib/krb5/krb/sendauth.c +++ b/src/lib/krb5/krb/sendauth.c @@ -218,7 +218,7 @@ krb5_sendauth(context, auth_context, error_return: krb5_free_cred_contents(context, &creds); - if (credspout) + if (!out_creds && credspout) krb5_free_creds(context, credspout); if (!ccache && use_ccache) krb5_cc_close(context, use_ccache); diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index a1d63cf2d..7a2624ac2 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,14 @@ +Wed Jan 14 21:12:20 1998 Tom Yu + + * locate_kdc.c (krb5_locate_kdc): Check return of + malloc. [krb5-libs/518] + + * locate_kdc.c (krb5_locate_kdc): Free hostlist array elements + when finished with them. + + * locate_kdc.c (krb5_locate_kdc): Get rid of extra krb5_xfree + which caused freeing of memory twice. + Wed Nov 13 02:53:31 1996 Tom Yu * osconfig.c: Add warning re: global variables. diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 418072f8f..b323c755e 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -65,7 +65,6 @@ krb5_locate_kdc(context, realm, addr_pp, naddrs) realm_kdc_names[3] = 0; code = profile_get_values(context->profile, realm_kdc_names, &hostlist); - krb5_xfree(host); if (code == PROF_NO_SECTION) return KRB5_REALM_UNKNOWN; @@ -98,6 +97,8 @@ krb5_locate_kdc(context, realm, addr_pp, naddrs) #endif addr_p = (struct sockaddr *)malloc (sizeof (struct sockaddr) * count); + if (addr_p == NULL) + return ENOMEM; for (i=0, out=0; hostlist[i]; i++) { host = hostlist[i]; diff --git a/src/lib/krb5/rcache/ChangeLog b/src/lib/krb5/rcache/ChangeLog index b5554fd25..80d7f7781 100644 --- a/src/lib/krb5/rcache/ChangeLog +++ b/src/lib/krb5/rcache/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 25 01:15:39 1997 Theodore Y. Ts'o + + * rc_io.c (krb5_rc_io_open): rcache owner should be checked against + the effective uid, not the real uid. [krb5-libs/366] + Mon Nov 18 15:25:51 1996 Theodore Y. Ts'o * rc_dfl.c: Apply jik's fix to allow the expunging of the replay diff --git a/src/lib/krb5/rcache/rc_io.c b/src/lib/krb5/rcache/rc_io.c index bf11e8ff9..3d69c15bd 100644 --- a/src/lib/krb5/rcache/rc_io.c +++ b/src/lib/krb5/rcache/rc_io.c @@ -185,7 +185,7 @@ krb5_error_code krb5_rc_io_open (context, d, fn) if ((d->fd = stat(d->fn, &statb)) != -1) { uid_t me; - me = getuid(); + me = geteuid(); /* must be owned by this user, to prevent some security problems with * other users modifying replay cache stufff */ if ((statb.st_uid != me) || ((statb.st_mode & S_IFMT) != S_IFREG)) { diff --git a/src/lib/libkrb5.def b/src/lib/krb5_16.def similarity index 95% rename from src/lib/libkrb5.def rename to src/lib/krb5_16.def index 9d9d5e5ef..abd9c7ee7 100644 --- a/src/lib/libkrb5.def +++ b/src/lib/krb5_16.def @@ -1,8 +1,8 @@ ;---------------------------------------------------- -; LIBKRB5.DEF - LIBKRB5.DLL module definition file +; KRB5_16.DEF - KRB5_16.DLL module definition file ;---------------------------------------------------- -LIBRARY LIBKRB5 +LIBRARY KRB5_16 DESCRIPTION 'DLL for Kerberos 5' EXETYPE WINDOWS CODE PRELOAD MOVEABLE DISCARDABLE diff --git a/src/lib/rpc/ChangeLog b/src/lib/rpc/ChangeLog index b4e0eb723..8ee1c1724 100644 --- a/src/lib/rpc/ChangeLog +++ b/src/lib/rpc/ChangeLog @@ -1,3 +1,23 @@ +Tue Oct 21 14:31:33 1997 Ezra Peisach + + * svc_auth_gssapi.c (destroy_client): Fix to not lose entries in + the chain linked list. + +Fri Nov 22 15:50:42 1996 unknown + + * get_myaddress.c (get_myaddress): use krb5_os_localaddr instead + of ioctl() to get local IP addresses [krb5-libs/227] + + * clnt_generic.c, clnt_simple.c, getrpcport.c: use sizeof instead + of h_length to determine number of bytes of addr to copy from DNS + response [krb5-misc/211] + +Fri Nov 22 11:49:43 1996 Sam Hartman + + * types.hin: Include stdlib.h if found at config time [203] + + * configure.in: Substitute STDLIB_INCLUDE into types.h. [203] + Tue Nov 12 16:27:27 1996 Barry Jaspan * auth_gssapi.c (auth_gssapi_create): handle channel bindings diff --git a/src/lib/rpc/clnt_generic.c b/src/lib/rpc/clnt_generic.c index f111c2e14..9eeabe152 100644 --- a/src/lib/rpc/clnt_generic.c +++ b/src/lib/rpc/clnt_generic.c @@ -73,7 +73,7 @@ clnt_create(hostname, prog, vers, proto) sin.sin_family = h->h_addrtype; sin.sin_port = 0; memset(sin.sin_zero, 0, sizeof(sin.sin_zero)); - memmove((char*)&sin.sin_addr, h->h_addr, h->h_length); + memmove((char*)&sin.sin_addr, h->h_addr, sizeof(sin.sin_addr)); p = getprotobyname(proto); if (p == NULL) { rpc_createerr.cf_stat = RPC_UNKNOWNPROTO; diff --git a/src/lib/rpc/clnt_simple.c b/src/lib/rpc/clnt_simple.c index 0d8f7a4df..9b5ba9fa6 100644 --- a/src/lib/rpc/clnt_simple.c +++ b/src/lib/rpc/clnt_simple.c @@ -88,7 +88,8 @@ callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out) return ((int) RPC_UNKNOWNHOST); timeout.tv_usec = 0; timeout.tv_sec = 5; - memmove((char *)&server_addr.sin_addr, hp->h_addr, hp->h_length); + memmove((char *)&server_addr.sin_addr, hp->h_addr, + sizeof(server_addr.sin_addr)); server_addr.sin_family = AF_INET; server_addr.sin_port = 0; if ((crp->client = clntudp_create(&server_addr, (rpc_u_int32)prognum, diff --git a/src/lib/rpc/configure.in b/src/lib/rpc/configure.in index c2217044f..dde9d53fa 100644 --- a/src/lib/rpc/configure.in +++ b/src/lib/rpc/configure.in @@ -6,7 +6,11 @@ AC_PROG_ARCHIVE AC_PROG_ARCHIVE_ADD AC_PROG_RANLIB AC_PROG_INSTALL - +dnl Arrange for types.hin to include stdlib.h +AC_CHECK_HEADER(stdlib.h, [ + STDLIB_INCLUDE="#include "], + [STDLIB_INCLUDE=""]) +AC_SUBST(STDLIB_INCLUDE) dnl ### Check where struct rpcent is declared. # # This is necessary to determine: diff --git a/src/lib/rpc/get_myaddress.c b/src/lib/rpc/get_myaddress.c index fa4c54e78..7986a384c 100644 --- a/src/lib/rpc/get_myaddress.c +++ b/src/lib/rpc/get_myaddress.c @@ -38,6 +38,46 @@ static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro"; * Copyright (C) 1984, Sun Microsystems, Inc. */ +#ifdef GSSAPI_KRB5 +#include +#include +#include +#include +#include +/* + * don't use gethostbyname, which would invoke yellow pages + */ +get_myaddress(addr) + struct sockaddr_in *addr; +{ + krb5_address **addrs, **a; + int ret; + + /* Hack! krb5_os_localaddr does not use the context arg! */ + if (ret = krb5_os_localaddr(NULL, &addrs)) { + com_err("get_myaddress", ret, "calling krb5_os_localaddr"); + exit(1); + } + a = addrs; + while (*a) { + if ((*a)->addrtype == ADDRTYPE_INET) { + memset(addr, 0, sizeof(*addr)); + addr->sin_family = AF_INET; + addr->sin_port = htons(PMAPPORT); + memcpy(&addr->sin_addr, (*a)->contents, sizeof(addr->sin_addr)); + break; + } + a++; + } + if (*a == NULL) { + com_err("get_myaddress", 0, "no local AF_INET address"); + exit(1); + } + /* Hack! krb5_free_addresses does not use the context arg! */ + krb5_free_addresses(NULL, addrs); +} + +#else /* !GSSAPI_KRB5 */ #include #include #include @@ -93,3 +133,4 @@ get_myaddress(addr) } (void) close(s); } +#endif /* !GSSAPI_KRB5 */ diff --git a/src/lib/rpc/getrpcport.c b/src/lib/rpc/getrpcport.c index d209a1527..1bc239f94 100644 --- a/src/lib/rpc/getrpcport.c +++ b/src/lib/rpc/getrpcport.c @@ -48,7 +48,7 @@ getrpcport(host, prognum, versnum, proto) if ((hp = gethostbyname(host)) == NULL) return (0); - memmove((char *) &addr.sin_addr, hp->h_addr, hp->h_length); + memmove((char *) &addr.sin_addr, hp->h_addr, sizeof(addr.sin_addr)); addr.sin_family = AF_INET; addr.sin_port = 0; return (pmap_getport(&addr, prognum, versnum, proto)); diff --git a/src/lib/rpc/svc_auth_gssapi.c b/src/lib/rpc/svc_auth_gssapi.c index 1e204e0e3..5c16b0859 100644 --- a/src/lib/rpc/svc_auth_gssapi.c +++ b/src/lib/rpc/svc_auth_gssapi.c @@ -5,6 +5,39 @@ * $Source$ * * $Log$ + * Revision 1.41.2.1 1997/10/31 01:03:47 tlyu + * * svc_auth_gssapi.c (destroy_client): Fix to not lose entries in + * the chain linked list. + * [pullup from trunk] + * + * Revision 1.43 1997/10/21 18:33:55 epeisach + * Fix to not lose entries in the chain linked client list. + * + * A pointer was not being updated resulting in the situation where + * random clients would sudenly fail with a misc. rpc. error as the client + * handle could not be found. The scenario required three active clients + * to trigger the problem. + * + * Revision 1.42 1996/12/04 17:47:18 bjaspan + * * Various changes to allow channel bindings to work with both UDP + * and TCP cleanly [krb5-libs/180]: + * + * * auth_gssapi.c: remove the special-case exception to channel + * bindings failure added in the previous revision, since we now + * solve the problem by making channel bindings not fail + * + * * clnt_udp.c: use a connected socket so that the client can + * determine its own source address with getsockname + * + * * svc.h: add xp_laddr and xp_laddrlen fields to SVCXPRT structure + * + * * svc_tcp.c: set xp_laddr and xp_laddrlen when a connection is + * established + * + * * svc_udp.c (svcudp_recv): use recvmsg with MSG_PEEK followed by + * recvfrom in order to determine both source and dest address on + * unconnected UDP socket, set xp_laddr and xp_laddrlen + * * Revision 1.41 1996/10/16 20:16:10 bjaspan * * svc_auth_gssapi.c (_svcauth_gssapi): accept add call_arg version 4 * @@ -998,8 +1031,10 @@ static void destroy_client(client_data) c2->next = c->next; free(c); goto done; - } else + } else { + c2 = c; c = c->next; + } } PRINTF(("destroy_client: client_handle delete failed\n")); abort(); diff --git a/src/lib/rpc/types.hin b/src/lib/rpc/types.hin index 9bd357d70..8722759cc 100644 --- a/src/lib/rpc/types.hin +++ b/src/lib/rpc/types.hin @@ -61,9 +61,7 @@ typedef unsigned long rpc_u_int32; # define NULL 0 #endif -#if defined(__osf__) -#include -#endif +@STDLIB_INCLUDE@ #define mem_alloc(bsize) (char *) malloc(bsize) #define mem_free(ptr, bsize) free(ptr) diff --git a/src/lib/rpc/unit-test/ChangeLog b/src/lib/rpc/unit-test/ChangeLog index 05a3de540..0303efb29 100644 --- a/src/lib/rpc/unit-test/ChangeLog +++ b/src/lib/rpc/unit-test/ChangeLog @@ -1,3 +1,7 @@ +Wed Nov 20 16:00:21 1996 Barry Jaspan + + * Makefile.in (unit-test-): warn more loudly about unrun tests + Thu Nov 14 22:27:05 1996 Tom Yu * server.c (main): Add declaration of optind for systems that diff --git a/src/lib/rpc/unit-test/Makefile.in b/src/lib/rpc/unit-test/Makefile.in index 3690dc349..26c10c79d 100644 --- a/src/lib/rpc/unit-test/Makefile.in +++ b/src/lib/rpc/unit-test/Makefile.in @@ -29,8 +29,10 @@ client.o server.o: rpc_test.h check unit-test:: unit-test-@DO_TEST@ unit-test-: - @echo "The rpc tests require Perl, Tcl, and runtest" - @echo "No tests run here" + @echo "+++" + @echo "+++ WARNING: lib/rpc unit tests not run." + @echo "+++ Either tcl, runtest, or Perl is unavailable." + @echo "+++" unit-test-ok:: unit-test-setup unit-test-body unit-test-cleanup diff --git a/src/mac/ChangeLog b/src/mac/ChangeLog index 654a0a8d9..b3be53fc8 100644 --- a/src/mac/ChangeLog +++ b/src/mac/ChangeLog @@ -1,3 +1,11 @@ +Fri Nov 22 07:54:57 1996 Theodore Ts'o + + * Makefile.tmpl: Use '%' in Makefiles where you really want a '/' + character in the mpw Makefile. (Translation in + src/Makefile.in) + + * version.r: Fix typos, and set version resource for 1.0 release. + Fri Nov 8 17:44:10 1996 Theodore Y. Ts'o * Makefile.tmpl: Add in version resource diff --git a/src/mac/Makefile.tmpl b/src/mac/Makefile.tmpl index 84ebae4fd..5a42dd4ae 100644 --- a/src/mac/Makefile.tmpl +++ b/src/mac/Makefile.tmpl @@ -3,11 +3,11 @@ KH68K = {KH}KerberosHeaders68K KHCFM-68K = {KH}KerberosHeadersCFM-68K KHPPC = {KH}KerberosHeadersPPC -GSSRTLCFM68K = "{MW68KLibraries}ANSI (4i/8d) C.CFM68K.Lib" \ +GSSRTLCFM68K = "{MW68KLibraries}ANSI (4i%8d) C.CFM68K.Lib" \ {MW68KLibraries}SIOUX.CFM68K.Lib \ {MW68KLibraries}InterfaceLib \ {MW68KLibraries}MWCFM68KRuntime.Lib \ - "{MW68KLibraries}MathLibCFM68K (4i/8d).Lib" + "{MW68KLibraries}MathLibCFM68K (4i%8d).Lib" GSSRTLCFMPPC = "{MWPPCLibraries}ANSI C.PPC.Lib" \ {MWPPCLibraries}SIOUX.PPC.Lib {MWPPCLibraries}MWCRuntime.Lib \ @@ -113,7 +113,6 @@ link-68KCFM-SAP : -sym fullpath -map libgss.68K.MAP -o GSSLibrarySAP.68K \ {GSSRTLCFM68K} {GSSOBJS68KCFM-SAP} {GSSOBJS68KCFM} Rez "/mac/SAP/GSSforSAP.r" -a -o GSSLibrarySAP.68K - Rez "/mac/version.r" -a -o GSSLibrarySAP.68K link-PPC-SAP : MWLinkPPC -sharedlibrary -name GSSLibrary -m "" \ @@ -122,7 +121,6 @@ link-PPC-SAP : -sym fullpath -map libgss.PPC.MAP -o GSSLibrarySAP.PPC \ {GSSRTLCFMPPC} {GSSOBJSPPC-SAP} {GSSOBJSPPC} Rez "/mac/SAP/GSSforSAP.r" -a -o GSSLibrarySAP.PPC - Rez "/mac/version.r" -a -o GSSLibrarySAP.PPC link-CFMFAT-SAP : Duplicate -y GSSLibrarySAP.68K GSSLibSAP diff --git a/src/mac/SAP/GSSforSAP.r b/src/mac/SAP/GSSforSAP.r index ca25a8384..8910dd756 100644 --- a/src/mac/SAP/GSSforSAP.r +++ b/src/mac/SAP/GSSforSAP.r @@ -1,4 +1,17 @@ +#ifdef mw_rez +#include +#include +#else +#include "SysTypes.r" #include "Types.r" +#endif + +resource 'vers' (1) { + 0x01, 0x00, final, 0x00, + verUS, + "1.0", + "1.0(SAP), Copyright 1996 Massachusetts Institute of Technology" +}; resource 'DITL' (135, nonpurgeable) { { /* array DITLarray: 2 elements */ diff --git a/src/mac/gss-sample/ChangeLog b/src/mac/gss-sample/ChangeLog index 63f061256..9975f8a92 100644 --- a/src/mac/gss-sample/ChangeLog +++ b/src/mac/gss-sample/ChangeLog @@ -1,3 +1,10 @@ +Fri Nov 22 15:51:55 1996 unknown + + * gss-client.c (connect_to_server): use sizeof instead of h_length + to determine number of bytes of addr to copy from DNS response + [krb5-misc/211] + + Thu 26 12:00:00 1995 John Rivlin * Created GSS Sample program diff --git a/src/mac/gss-sample/gss-client.c b/src/mac/gss-sample/gss-client.c index d7dd26eba..b2be7c84c 100644 --- a/src/mac/gss-sample/gss-client.c +++ b/src/mac/gss-sample/gss-client.c @@ -336,7 +336,7 @@ SOCKET connect_to_server(char *host, u_short port) } saddr.sin_family = hp->h_addrtype; - memcpy((char *)&saddr.sin_addr, hp->h_addr, hp->h_length); + memcpy((char *)&saddr.sin_addr, hp->h_addr, sizeof(saddr.sin_addr)); saddr.sin_port = htons(port); if ((s = socket(AF_INET, SOCK_STREAM, 0)) == (SOCKET) -1) { diff --git a/src/mac/libraries/ChangeLog b/src/mac/libraries/ChangeLog index 1a8d737a8..4388c5e7f 100644 --- a/src/mac/libraries/ChangeLog +++ b/src/mac/libraries/ChangeLog @@ -1,3 +1,9 @@ +Sat Nov 23 00:18:20 1996 Theodore Ts'o + + * KerberosHeaders.h: Remove DES3 and SHA support for 1.0, since + what's there isn't the correct final algorithm. (They + will be re-added later.) [PR #231] + Tue Apr 30 14:53:54 1996 * KerberosHeaders.h: Removed PROVIDE_SNEFRU (shouldn't be there) diff --git a/src/mac/libraries/KerberosHeaders.h b/src/mac/libraries/KerberosHeaders.h index ac4e62da6..a25d00157 100644 --- a/src/mac/libraries/KerberosHeaders.h +++ b/src/mac/libraries/KerberosHeaders.h @@ -35,9 +35,9 @@ typedef unsigned int size_t; #define PROVIDE_DES_CBC_CRC #define PROVIDE_DES_CBC_MD5 #define PROVIDE_DES_CBC_RAW -#define PROVIDE_DES3_CBC_MD5 -#define PROVIDE_DES3_CBC_RAW - +/* #define PROVIDE_DES3_CBC_MD5 */ +/* #define PROVIDE_DES3_CBC_RAW */ +/* #define PROVIDE_NIST_SHA */ #define NO_SYS_TYPES_H #define NO_SYS_STAT_H diff --git a/src/mac/mkbindirs.sh b/src/mac/mkbindirs.sh new file mode 100644 index 000000000..cdc2af202 --- /dev/null +++ b/src/mac/mkbindirs.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# This shell script creates the Macintosh binary hierarchies. + +topbin=$1 +shift + +for DIR do + mkdir $topbin/$DIR + for SDIR in `sed -n -e 's/MAC_SUBDIRS.*=//p' $DIR/Makefile.in`; do + /bin/sh mac/mkbindirs.sh $topbin $DIR/$SDIR; + done +done diff --git a/src/mac/version.r b/src/mac/version.r index 85ece8583..a83d10ff2 100644 --- a/src/mac/version.r +++ b/src/mac/version.r @@ -1,9 +1,14 @@ +#ifdef mw_rez #include #include +#else +#include "SysTypes.r" +#include "Types.r" +#endif resource 'vers' (1) { - 0x00, 0x07, beta, 0x01, - verUS - "Beta 7 Build 1", - "Beta 7 Build 1, Copyright 1996 Massachusetts Institute of Technology" + 0x01, 0x00, final, 0x00, + verUS, + "1.0", + "1.0, Copyright 1996 Massachusetts Institute of Technology" }; diff --git a/src/patchlevel.h b/src/patchlevel.h index ab2b4e215..274296651 100644 --- a/src/patchlevel.h +++ b/src/patchlevel.h @@ -1,2 +1,3 @@ -#define KRB5_MAJOR_RELEASE BETA_7 +#define KRB5_MAJOR_RELEASE 1 #define KRB5_MINOR_RELEASE 0 +#define KRB5_PATCHLEVEL 1 diff --git a/src/slave/ChangeLog b/src/slave/ChangeLog index 60673e1dc..acaeb8a3d 100644 --- a/src/slave/ChangeLog +++ b/src/slave/ChangeLog @@ -1,3 +1,20 @@ +Thu Dec 5 21:15:27 1996 Tom Yu + + * kslave_update: Update script for new filename conventions. [PR + 280] + + * kprop.M: Update outdated references to kdb5_edit and /krb5 [PR + 279] + + * kpropd.M: Update outdated references to kdb5_edit and /krb5 [PR + 279] + +Fri Nov 22 15:52:07 1996 unknown + + * kprop.c (open_connection): use sizeof instead of h_length to + determine number of bytes of addr to copy from DNS response + [krb5-misc/211] + Thu Nov 7 15:18:01 1996 Theodore Ts'o * kprop.c (main): diff --git a/src/slave/kprop.M b/src/slave/kprop.M index 7a25db6df..a0b5ac840 100644 --- a/src/slave/kprop.M +++ b/src/slave/kprop.M @@ -35,8 +35,8 @@ Kerberos server to a slave Kerberos server, which is specfied by .IR slave_host . This is done by transmitting the dumped database file to the slave server over an encrypted, secure channel. The dump file must be created -by kdb5_edit, and is normally KPROP_DEFAULT_FILE -(/krb5/slave_datatrans). +by kdb5_util, and is normally KPROP_DEFAULT_FILE +(/usr/local/var/krb5kdc/slave_datatrans). .SH OPTIONS .TP \fB\-r\fP \fIrealm\fP @@ -48,7 +48,7 @@ is used. \fB\-f\fP \fIfile\fP specifies the filename where the dumped principal database file is to be found; by default the dumped database file is KPROP_DEFAULT_FILE -(normally /krb5/slave_datatrans). +(normally /usr/local/var/krb5kdc/slave_datatrans). .TP \fB\-P\fP \fIport\fP specifies the port to use to contact the @@ -61,4 +61,4 @@ prints debugging information. \fB\-s\fP \fIkeytab\fP specifies the location of the keytab file. .SH SEE ALSO -kpropd(8), kdb5_edit(8), krb5kdc(8) +kpropd(8), kdb5_util(8), krb5kdc(8) diff --git a/src/slave/kprop.c b/src/slave/kprop.c index 3c4848135..0ddcc2fb1 100644 --- a/src/slave/kprop.c +++ b/src/slave/kprop.c @@ -324,7 +324,7 @@ open_connection(host, fd, Errmsg) return(0); } sin.sin_family = hp->h_addrtype; - memcpy((char *)&sin.sin_addr, hp->h_addr, hp->h_length); + memcpy((char *)&sin.sin_addr, hp->h_addr, sizeof(sin.sin_addr)); if(!port) { sp = getservbyname(KPROP_SERVICE, "tcp"); if (sp == 0) { diff --git a/src/slave/kpropd.M b/src/slave/kpropd.M index 3228ed953..e037a1121 100644 --- a/src/slave/kpropd.M +++ b/src/slave/kpropd.M @@ -35,7 +35,7 @@ kpropd \- Kerberos V5 slave KDC update server .I principal_database ] [ .B \-p -.I kdb5_edit_prog +.I kdb5_util_prog ] [ .B \-d ] [ @@ -52,7 +52,7 @@ is the server which accepts connections from the program. .I kpropd accepts the dumped KDC database and places it in a file, and then runs -.IR kdb5_edit (8) +.IR kdb5_util (8) to load the dumped database into the active database which is used by .IR krb5kdc (8). Thus, the master Kerberos server can use @@ -66,7 +66,7 @@ Normally, kpropd is invoked out of This is done by adding a line to the inetd.conf file which looks like this: -kprop stream tcp nowait root /krb5/bin/kpropd kpropd +kprop stream tcp nowait root /usr/local/sbin/kpropd kpropd However, kpropd can also run as a standalone deamon, if the .B \-S @@ -84,13 +84,13 @@ is used. \fB\-f\fP \fIfile\fP specifies the filename where the dumped principal database file is to be stored; by default the dumped database file is KPROPD_DEFAULT_FILE -(normally /krb5/from_master). +(normally /usr/local/var/krb5kdc/from_master). .TP .B \-p allows the user to specify the pathname to the -.IR kdb5_edit (8) -program; by default the pathname used is KPROPD_DEFAULT_KDB5_EDIT -(normally /krb5/bin/kdb5_edit). +.IR kdb5_util (8) +program; by default the pathname used is KPROPD_DEFAULT_KDB5_UTIL +(normally /usr/local/sbin/kdb5_util). .TP .B \-S turn on standalone mode. Normally, kpropd is invoked out of @@ -124,4 +124,4 @@ Access file for Each entry is a line containing the principal of a host from which the local machine will allow Kerberos database propagation via kprop. .SH SEE ALSO -kprop(8), kdb5_edit(8), krb5kdc(8), inetd(8) +kprop(8), kdb5_util(8), krb5kdc(8), inetd(8) diff --git a/src/slave/kslave_update b/src/slave/kslave_update index d6207de60..a4da274ff 100644 --- a/src/slave/kslave_update +++ b/src/slave/kslave_update @@ -1,16 +1,16 @@ #!/bin/sh # -# Propagate if database (principal.pag) has been modified since last dump +# Propagate if database (principal.db) has been modified since last dump # (dumpfile.dump_ok) or if database has been dumped since last successful # propagation (dumpfile..last_prop) -KDB_DIR=/krb5 +KDB_DIR=/usr/local/var/krb5kdc -KDB_FILE=$KDB_DIR/principal.page +KDB_FILE=$KDB_DIR/principal.db DUMPFILE=$KDB_DIR/slave_datatrans -KDB5_EDIT=/krb5/sbin/kdb5_edit -KPROP=/krb5/sbin/kprop - +KDB5_UTIL=/usr/local/sbin/kdb5_util +KPROP=/usr/local/sbin/kprop + SLAVE=$1 if [ -z "${SLAVE}" ] then @@ -23,7 +23,7 @@ if [ "`ls -t $DUMPFILE.dump_ok $KDB_FILE | sed -n 1p`" = "$KDB_FILE" -o \ then date - $KDB5_EDIT -R "ddb $DUMPFILE" >/dev/null + $KDB5_EDIT dump $DUMPFILE > /dev/null $KPROP -d -f $DUMPFILE ${SLAVE} rm $DUMPFILE diff --git a/src/tests/dejagnu/ChangeLog b/src/tests/dejagnu/ChangeLog index 52b0d0d13..619475c72 100644 --- a/src/tests/dejagnu/ChangeLog +++ b/src/tests/dejagnu/ChangeLog @@ -1,3 +1,7 @@ +Wed Nov 20 16:01:34 1996 Barry Jaspan + + * Makefile.in (check-): warn more loudly about unrun tests + Mon Oct 7 15:46:47 1996 Ezra Peisach * Makefile.in (HAVE_RUNTEST): Renamed from RUNTEST as diff --git a/src/tests/dejagnu/Makefile.in b/src/tests/dejagnu/Makefile.in index bab9ca766..50b97e7d4 100644 --- a/src/tests/dejagnu/Makefile.in +++ b/src/tests/dejagnu/Makefile.in @@ -7,7 +7,10 @@ all install:: check:: check-$(HAVE_RUNTEST) check-:: - @echo "Dejagnu is not installed on this system. No tests run." + @echo "+++" + @echo "+++ WARNING: tests/dejagnu tests not run." + @echo "+++ runtest is unavailable." + @echo "+++" check-runtest:: t_inetd site.exp $(HAVE_RUNTEST) --tool krb --srcdir $(srcdir) $(RUNTESTFLAGS) diff --git a/src/tests/dejagnu/config/ChangeLog b/src/tests/dejagnu/config/ChangeLog index 5416b6a5d..a03733756 100644 --- a/src/tests/dejagnu/config/ChangeLog +++ b/src/tests/dejagnu/config/ChangeLog @@ -1,3 +1,14 @@ +Mon Nov 25 14:23:06 1996 Theodore Y. Ts'o + + * defualt.exp: Ezra's fix so that the dejagnu tests don't bomb out + if KRB5_KTNAME is set for some reason. + +Tue Nov 19 15:13:30 1996 Tom Yu + + * default.exp (check_k5login): Check for principal + $env(USER)@$REALMNAME rather than simply $env(USER), so that + kuser_ok dtrt, hopefully. + Mon Nov 11 20:52:27 1996 Mark Eichin * dejagnu: set env(TERM) dumb, find ktutil diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp index 4e3ebeb07..9e728ca5b 100644 --- a/src/tests/dejagnu/config/default.exp +++ b/src/tests/dejagnu/config/default.exp @@ -134,6 +134,7 @@ if ![info exists SHELL_PROMPT] { proc check_k5login { testname } { global env + global REALMNAME if ![file exists ~/.k5login] { return 1 @@ -141,7 +142,7 @@ proc check_k5login { testname } { set file [open ~/.k5login r] while { [gets $file principal] != -1 } { - if { $principal == $env(USER) } { + if { $principal == "$env(USER)@$REALMNAME" } { close $file return 1 } @@ -760,6 +761,7 @@ proc start_kerberos_daemons { standalone } { global kadmind_pid global kadmind_spawn_id global tmppwd + global env if ![setup_kerberos_db 0] { return 0 @@ -818,6 +820,17 @@ proc start_kerberos_daemons { standalone } { # Give the kerberos daemon a few seconds to get set up. sleep 2 + + # + # Save setting of KRB5_KTNAME. We do not want to override kdc.conf + # file during kadmind startup. (this is in case user has KRB5_KTNAME + # set before starting make check) + # + if [info exists env(KRB5_KTNAME)] { + set start_save_ktname $env(KRB5_KTNAME) + } + catch "unset env(KRB5_KTNAME)" + if ![file exists $kadmind_lfile] then { catch [touch $kadmind_lfile] sleep 1 @@ -841,10 +854,20 @@ proc start_kerberos_daemons { standalone } { if {$count >= $retry} { fail "kadmin5 (starting)" + if [info exists start_save_ktname] { + set env(KRB5_KTNAME) $start_save_ktname + unset start_save_ktname + } stop_kerberos_daemons return 0 } + # Restore KRB5_KTNAME + if [info exists start_save_ktname] { + set env(KRB5_KTNAME) $start_save_ktname + unset start_save_ktname + } + switch -regexp [tail1 $kadmind_lfile] { "cannot initialize network" { fail "kadmind (network init)" diff --git a/src/tests/misc/test_getsockname.c b/src/tests/misc/test_getsockname.c index 12efa0641..b4f6cb44d 100644 --- a/src/tests/misc/test_getsockname.c +++ b/src/tests/misc/test_getsockname.c @@ -46,7 +46,7 @@ main(argc, argv) /* Set server's address */ (void) memset((char *)&s_sock, 0, sizeof(s_sock)); - memcpy((char *)&s_sock.sin_addr, host->h_addr, host->h_length); + memcpy((char *)&s_sock.sin_addr, host->h_addr, sizeof(s_sock.sin_addr)); #ifdef DEBUG printf("s_sock.sin_addr is %s\n", inet_ntoa(s_sock.sin_addr)); #endif diff --git a/src/util/ChangeLog b/src/util/ChangeLog index 9a3cb27f8..0d4e83795 100644 --- a/src/util/ChangeLog +++ b/src/util/ChangeLog @@ -1,3 +1,18 @@ +Wed Oct 8 16:19:49 1997 Tom Yu + + * mkrel: Allow for edits of relevant files that should be changed + each time a release is cut. Some snapshot support. Add "-9" flag + to gzip. + +Mon Nov 25 21:00:24 1996 Tom Yu + + * mkrel: Add support for --srconly, --doconly, --nocheckout, + --repository, etc. They do the obvious things. + +Fri Nov 22 11:08:16 1996 Sam Hartman + + * makeshlib.sh (VERSION): Fix SunOS shared libs [226] + Tue Nov 12 17:32:08 1996 Barry Jaspan * send-pr/send-pr.sh (MAIL_AGENT): change "[-x" to "[ -x" diff --git a/src/util/db2/ChangeLog b/src/util/db2/ChangeLog index fdabe09b0..41774ba89 100644 --- a/src/util/db2/ChangeLog +++ b/src/util/db2/ChangeLog @@ -1,3 +1,13 @@ +Sun Dec 21 18:33:14 1997 Tom Yu + + * hash/dbm.c: Rename the errno member of HTAB. + + * hash/hash.h: Rename the errno member of HTAB to local_errno to + avoid a collision with a glibc macro. + + * hash/hash.c: Rename the errno member of HTAB to local_errno to + avoid a collision with a glibc macro. + Mon Nov 11 17:01:29 1996 Mark Eichin * db2: overflow_page fixes, __P redef diff --git a/src/util/db2/hash/dbm.c b/src/util/db2/hash/dbm.c index c4ba92beb..474512775 100644 --- a/src/util/db2/hash/dbm.c +++ b/src/util/db2/hash/dbm.c @@ -328,7 +328,7 @@ dbm_error(db) HTAB *hp; hp = (HTAB *)db->internal; - return (hp->errno); + return (hp->local_errno); } int @@ -338,7 +338,7 @@ dbm_clearerr(db) HTAB *hp; hp = (HTAB *)db->internal; - hp->errno = 0; + hp->local_errno = 0; return (0); } diff --git a/src/util/db2/hash/hash.c b/src/util/db2/hash/hash.c index 2811688ad..e52275438 100644 --- a/src/util/db2/hash/hash.c +++ b/src/util/db2/hash/hash.c @@ -632,7 +632,7 @@ hash_get(dbp, key, data, flag) hashp = (HTAB *)dbp->internal; if (flag) { - hashp->errno = errno = EINVAL; + hashp->local_errno = errno = EINVAL; return (ERROR); } return (hash_access(hashp, HASH_GET, (DBT *)key, data)); @@ -649,11 +649,11 @@ hash_put(dbp, key, data, flag) hashp = (HTAB *)dbp->internal; if (flag && flag != R_NOOVERWRITE) { - hashp->errno = errno = EINVAL; + hashp->local_errno = errno = EINVAL; return (ERROR); } if ((hashp->flags & O_ACCMODE) == O_RDONLY) { - hashp->errno = errno = EPERM; + hashp->local_errno = errno = EPERM; return (ERROR); } return (hash_access(hashp, flag == R_NOOVERWRITE ? @@ -670,11 +670,11 @@ hash_delete(dbp, key, flag) hashp = (HTAB *)dbp->internal; if (flag) { - hashp->errno = errno = EINVAL; + hashp->local_errno = errno = EINVAL; return (ERROR); } if ((hashp->flags & O_ACCMODE) == O_RDONLY) { - hashp->errno = errno = EPERM; + hashp->local_errno = errno = EPERM; return (ERROR); } @@ -849,7 +849,7 @@ cursor_get(dbp, cursorp, key, val, flags) hashp = (HTAB *)dbp->internal; if (flags && flags != R_FIRST && flags != R_NEXT) { - hashp->errno = errno = EINVAL; + hashp->local_errno = errno = EINVAL; return (ERROR); } #ifdef HASH_STATISTICS diff --git a/src/util/db2/hash/hash.h b/src/util/db2/hash/hash.h index a12c8d4c2..170c24c86 100644 --- a/src/util/db2/hash/hash.h +++ b/src/util/db2/hash/hash.h @@ -94,7 +94,7 @@ typedef struct htab { /* Memory resident data structure */ u_int8_t *bigkey_buf; /* Temporary Buffer for BIG keys */ u_int16_t *split_buf; /* Temporary buffer for splits */ CURSOR *seq_cursor; /* Cursor used for hash_seq */ - int32_t errno; /* Error Number -- for DBM compatability */ + int32_t local_errno; /* Error Number -- for DBM compatability */ int32_t new_file; /* Indicates if fd is backing store or no */ int32_t save_file; /* Indicates whether we need to flush file at * exit */ diff --git a/src/util/db2/obj/ChangeLog b/src/util/db2/obj/ChangeLog index d2c8bb808..6f09fcd60 100644 --- a/src/util/db2/obj/ChangeLog +++ b/src/util/db2/obj/ChangeLog @@ -1,3 +1,7 @@ +Mon Nov 25 16:20:35 1996 Sam Hartman + + * Makefile.in (check): Remove install rule to fix pmake problem. [236] + Wed Sep 11 18:55:38 1996 Tom Yu * Makefile.in (memmove.o): add -DMEMMOVE to compile as memmove diff --git a/src/util/db2/obj/Makefile.in b/src/util/db2/obj/Makefile.in index 4445e37c6..0c022e273 100644 --- a/src/util/db2/obj/Makefile.in +++ b/src/util/db2/obj/Makefile.in @@ -56,10 +56,6 @@ check:: dbtest TMPDIR=$(TMPDIR) $(FCTSH) $(top_srcdir)/test/run.test install:: - cp $(LIBDB) $(libdir) - $(RANLIB) $(libdir)/$(LIBDB) - cp $(top_srcdir)/include/db.h $(includedir) - cp ../db-config.h $(includedir) clean:: rm -f $(ALL_OBJS) $(LIBDB) \ diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog index 38d80eb7a..227dc7caf 100644 --- a/src/util/et/ChangeLog +++ b/src/util/et/ChangeLog @@ -1,3 +1,7 @@ +Mon Nov 18 20:37:19 1996 Ezra Peisach + + * configure.in: Set shared library version to 1.0. [krb5-libs/201] + Wed Nov 13 19:19:08 1996 Tom Yu * Makefile.in (clean-unix): Remove shared/*. diff --git a/src/util/et/configure.in b/src/util/et/configure.in index 7b0cf00f7..15fd8d84d 100644 --- a/src/util/et/configure.in +++ b/src/util/et/configure.in @@ -25,5 +25,5 @@ AC_HEADER_STDARG AC_HAVE_HEADERS(stdlib.h) CopySrcHeader(com_err.h,$(BUILDTOP)/include) V5_SHARED_LIB_OBJS -V5_MAKE_SHARED_LIB(libcom_err,0.1,[$](TOPLIBD), ../util/et) +V5_MAKE_SHARED_LIB(libcom_err,1.0,[$](TOPLIBD), ../util/et) V5_AC_OUTPUT_MAKEFILE diff --git a/src/util/makeshlib.sh b/src/util/makeshlib.sh index 74c73b705..a8afb3b11 100644 --- a/src/util/makeshlib.sh +++ b/src/util/makeshlib.sh @@ -96,15 +96,16 @@ mips-sni-sysv4) optflags="" if test "$HAVE_GCC"x = "x" ; then - optflags="-h $library" + optflags="" + CC=ld else # XXX assumes that we're either using # recent gld (binutils 2.7?) or else using native ld - optflags="-Wl,-h -Wl,$library" + optflags="" fi echo ld -dp -assert pure-text $ldflags -o $library $optflags $FILES $libdirfl - ld -dp -assert pure-text $ldflags -o $library $optflags $FILES $libdirfl +ld -dp -assert pure-text $ldflags -o $library $optflags $FILES $libdirfl stat=$? ;; *-*-aix*) diff --git a/src/util/mkrel b/src/util/mkrel index 20b61a3af..4c96302bd 100644 --- a/src/util/mkrel +++ b/src/util/mkrel @@ -1,60 +1,123 @@ #!/bin/sh -: ${repository=/afs/athena.mit.edu/astaff/project/krbdev/.cvsroot} -case $# in -2);; -*) - echo "usage: $0 release-tag release-dir" +repository=:kserver:cvs.mit.edu:/cvs/krbdev +dodoc=t +dosrc=t +checkout=t +while test $# -gt 2; do + case $1 in + --srconly) + dodoc=nil;; + --doconly) + dosrc=nil;; + --repository) + shift; repository=$1;; + --nocheckout) + checkout=nil;; + esac + shift +done +if test $# -lt 2; then + echo "usage: $0 [opts] release-tag release-dir" exit 1 - ;; -esac +fi reltag=$1 reldir=$2 -case reldir in +relmajor=0 +relminor=0 +relpatch=0 +reldate=`date +%Y%m%d` + +case "$reldir" in */*) echo "release-dir may not contain slashes." exit 1 ;; +*" "*|*" "*) + echo "release-dir may not contain whitespace." + exit 1 + ;; +krb5-*.*.*) + release=`echo $reldir|sed -e 's/krb5-//'` + relmajor=`echo $release|awk -F. '{print $1}'` + relminor=`echo $release|awk -F. '{print $2}'` + relpatch=`echo $release|awk -F. '{print $3}'` + ;; +krb5-*.*) + release=`echo $reldir|sed -e 's/krb5-//'` + relmajor=`echo $release|awk -F. '{print $1}'` + relminor=`echo $release|awk -F. '{print $2}'` + ;; +krb5-current) + release=current-$reldate + ;; *);; esac -if test ! -d $reldir; then - mkdir $reldir +if test $checkout = t; then + echo "Checking out krb5 with tag $reltag into directory $reldir..." + cvs -q -d $repository export -r$reltag -d $reldir krb5 +fi + +if test $dosrc = t; then + echo "Building autoconf..." + (cd $reldir/src/util/autoconf + M4=gm4 ./configure + make) + + echo "Creating configure scripts..." + (cd $reldir/src; util/reconf) + + echo "Cleaning src/util/autoconf..." + (cd $reldir/src/util/autoconf; make distclean) fi -echo "Checking out krb5 with tag $reltag into directory $reldir..." -(cd $reldir; cvs -q -d $repository export -r$reltag krb5) +echo "Editing release-specific files..." -echo "Building autoconf..." -(cd $reldir/src/util/autoconf - M4=gm4 ./configure - make) +(cd $reldir/src/lib/krb5/krb && \ + sed -e '/static/s%KRB5_BRAND:[^"]*"%'"KRB5_BRAND: $reltag $release $reldate"'"%' \ + brand.c > brand.c.new && mv brand.c.new brand.c; \ + rm -f brand.c.new) -echo "Creating configure scripts..." -(cd $reldir/src; util/reconf) +(cd $reldir/src/util/send-pr && \ + sed -e 's%RELEASE=.*%RELEASE='"krb5-$release"'%' Makefile.in \ + > Makefile.in.new && mv Makefile.in.new Makefile.in) -echo "Cleaning src/util/autoconf..." -(cd $reldir/src/util/autoconf; make distclean) +(cd $reldir/src && \ + cat > patchlevel.h < + + * prof_parse.c (parse_std_line, parse_quoted_string, + need_double_quotes, output_quoted_string, dump_profile, + dump_profile_to_file): Vastly improved the profile + parsing; whitespace at the end of lines are now ignored. + Added quoted string parsing, complete with backquote + processing. Strings which need to be quoted are properly + quoted on output. + Mon Nov 4 17:04:51 1996 Theodore Y. Ts'o * prof_parse.c (parse_std_line): Accept either ';' or '#' on the diff --git a/src/util/profile/prof_parse.c b/src/util/profile/prof_parse.c index 941cc33f7..e7e72b8cd 100644 --- a/src/util/profile/prof_parse.c +++ b/src/util/profile/prof_parse.c @@ -43,6 +43,36 @@ static void strip_line(line) } } +static void parse_quoted_string(char *str) +{ + char *to, *from; + + to = from = str; + + for (to = from = str; *from && *from != '"'; to++, from++) { + if (*from == '\\') { + from++; + switch (*from) { + case 'n': + *to = '\n'; + break; + case 't': + *to = '\t'; + break; + case 'b': + *to = '\b'; + break; + default: + *to = *from; + } + continue; + } + *to = *from; + } + *to = '\0'; +} + + static errcode_t parse_init_state(state) struct parse_state *state; { @@ -126,12 +156,19 @@ static errcode_t parse_std_line(line, state) } cp = skip_over_blanks(cp+1); value = cp; - if (value[0] == 0) { + if (value[0] == '"') { + value++; + parse_quoted_string(value); + } else if (value[0] == 0) { do_subsection++; state->state = STATE_GET_OBRACE; - } - if (value[0] == '{' && value[1] == 0) + } else if (value[0] == '{' && value[1] == 0) do_subsection++; + else { + cp = value + strlen(value) - 1; + while ((cp > value) && isspace(*cp)) + *cp-- = 0; + } if (do_subsection) { retval = profile_add_node(state->current_section, tag, 0, &state->current_section); @@ -200,6 +237,60 @@ errcode_t profile_parse_file(f, root) return 0; } +/* + * Return TRUE if the string begins or ends with whitespace + */ +static int need_double_quotes(str) + char *str; +{ + if (!str || !*str) + return 0; + if (isspace(*str) ||isspace(*(str + strlen(str) - 1))) + return 1; + if (strchr(str, '\n') || strchr(str, '\t') || strchr(str, '\b')) + return 1; + return 0; +} + +/* + * Output a string with double quotes, doing appropriate backquoting + * of characters as necessary. + */ +static void output_quoted_string(str, f) + char *str; + FILE *f; +{ + char ch; + + fputc('"', f); + if (!str) { + fputc('"', f); + return; + } + while (ch = *str++) { + switch (ch) { + case '\\': + fputs("\\\\", f); + break; + case '\n': + fputs("\\n", f); + break; + case '\t': + fputs("\\t", f); + break; + case '\b': + fputs("\\b", f); + break; + default: + fputc(ch, f); + break; + } + } + fputc('"', f); +} + + + #if defined(_MSDOS) || defined(_WIN32) #define EOL "\r\n" #endif @@ -232,7 +323,13 @@ void dump_profile(root, level) break; for (i=0; i < level; i++) printf(" "); - printf("%s = '%s'%s", name, value, EOL); + if (need_double_quotes(value)) { + fputs(name, stdout); + fputs(" = ", stdout); + output_quoted_string(value, stdout); + fputs(EOL, stdout); + } else + printf("%s = '%s'%s", name, value, EOL); } while (iter != 0); iter = 0; @@ -269,7 +366,13 @@ void dump_profile_to_file(root, level, dstfile) break; for (i=0; i < level; i++) fprintf(dstfile, "\t"); - fprintf(dstfile, "%s = %s%s", name, value, EOL); + if (need_double_quotes(value)) { + fputs(name, dstfile); + fputs(" = ", dstfile); + output_quoted_string(value, dstfile); + fputs(EOL, dstfile); + } else + fprintf(dstfile, "%s = %s%s", name, value, EOL); } while (iter != 0); iter = 0; diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index 8816ca86b..eda2d473d 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,3 +1,34 @@ +Sun Dec 7 00:05:28 1997 Tom Yu + + * getpty.c (pty_getpty): Fix goof in previous, which introduced + another fencepost error. + +Thu Dec 4 21:48:12 1997 Tom Yu + + * getpty.c (pty_getpty): Fix checks on string lengths to account + for terminating nul character. Some whitespace fixups. + +Wed Dec 3 17:16:44 1997 Tom Yu + + * pty_err.et: Add PTY_OPEN_SLAVE_TOOSHORT error code. + + * open_slave.c (pty_open_slave): Check to ensure that the slave + name is not NULL or zero-length. + +Tue Jun 3 23:05:07 1997 Theodore Y. Ts'o + + * getpty.c (pty_getpty): Remove erroneous space from the HPUX open(). + +Thu Dec 5 22:43:35 1996 Theodore Y. Ts'o + + * update_utmp.c (pty_update_utmp): Apply platform specific patch + so that HPUX works. (Kludge for 1.0 release) [PR#40] + +Fri Nov 22 11:52:52 1996 Sam Hartman + + * configure.in : Make sure time_t is define [203] + * update_wtmp.c (ptyint_update_wtmp): Use time_t for call to time(2). [203] + Fri Nov 15 08:33:54 1996 Ezra Peisach * update_utmp.c (pty_update_utmp): Handle case where utmp uses diff --git a/src/util/pty/configure.in b/src/util/pty/configure.in index 2394debbe..3c6386af7 100644 --- a/src/util/pty/configure.in +++ b/src/util/pty/configure.in @@ -50,6 +50,7 @@ dnl AC_SUBST(LOGINLIBS) dnl AC_TYPE_MODE_T +AC_CHECK_TYPE(time_t, int) AC_FUNC_CHECK(strsave,AC_DEFINE(HAS_STRSAVE)) AC_HAVE_FUNCS(getutent setreuid gettosbyname setsid ttyname line_push ptsname grantpt openpty logwtmp getutmpx) AC_CHECK_HEADERS(unistd.h stdlib.h string.h utmpx.h utmp.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h) diff --git a/src/util/pty/getpty.c b/src/util/pty/getpty.c index 1185f2c6f..9b18aff57 100644 --- a/src/util/pty/getpty.c +++ b/src/util/pty/getpty.c @@ -25,13 +25,13 @@ long pty_getpty (fd, slave, slavelength) int slavelength; int *fd; char *slave; { - char *cp; + char *cp; char *p; int i,ptynum; struct stat stb; -char slavebuf[1024]; + char slavebuf[1024]; #ifdef HAVE__GETPTY -char *slaveret; /*Temporary to hold pointer to slave*/ + char *slaveret; /*Temporary to hold pointer to slave*/ #endif /*HAVE__GETPTY*/ #ifdef HAVE_OPENPTY @@ -39,7 +39,7 @@ char *slaveret; /*Temporary to hold pointer to slave*/ if(openpty(fd, &slavefd, slave, (struct termios *) 0, (struct winsize *) 0)) return 1; -close(slavefd); + close(slavefd); return 0; #else /*HAVE_OPENPTY*/ #ifdef HAVE__GETPTY @@ -51,19 +51,19 @@ close(slavefd); * paths. */ if ((slaveret = _getpty(fd, O_RDWR|O_NDELAY, 0600, 0)) == 0) { - *fd = -1; - return PTY_GETPTY_NOPTY; + *fd = -1; + return PTY_GETPTY_NOPTY; } - if (strlen(slaveret) > slavelength) { - close(*fd); - *fd = -1; - return PTY_GETPTY_SLAVE_TOOLONG; + if (strlen(slaveret) > slavelength - 1) { + close(*fd); + *fd = -1; + return PTY_GETPTY_SLAVE_TOOLONG; } else strcpy(slave, slaveret); return 0; #else /*HAVE__GETPTY*/ - *fd = open(" /dev/ptym/clone", O_RDWR|O_NDELAY); /* HPUX*/ + *fd = open("/dev/ptym/clone", O_RDWR|O_NDELAY); /* HPUX*/ #ifdef HAVE_STREAMS if (*fd < 0) *fd = open("/dev/ptmx",O_RDWR|O_NDELAY); /*Solaris*/ #endif @@ -86,13 +86,11 @@ close(slavefd); #endif #endif if (p) { - if ( strlen(p) > slavelength) - { + if (strlen(p) > slavelength - 1) { close (*fd); *fd = -1; return PTY_GETPTY_SLAVE_TOOLONG; - } - + } strcpy(slave, p); return 0; } @@ -102,21 +100,19 @@ close(slavefd); return PTY_GETPTY_FSTAT; } ptynum = (int)(stb.st_rdev&0xFF); - sprintf(slavebuf, "/dev/ttyp%x", ptynum); - if ( strlen(slavebuf) > slavelength) { - close(*fd); - *fd = -1; - return PTY_GETPTY_SLAVE_TOOLONG; - } - strncpy ( slave, slavebuf, slavelength); + sprintf(slavebuf, "/dev/ttyp%x", ptynum); + if (strlen(slavebuf) > slavelength - 1) { + close(*fd); + *fd = -1; + return PTY_GETPTY_SLAVE_TOOLONG; + } + strncpy(slave, slavebuf, slavelength); return 0; - } else { - - for (cp = "pqrstuvwxyzPQRST";*cp; cp++) { + for (cp = "pqrstuvwxyzPQRST";*cp; cp++) { sprintf(slavebuf,"/dev/ptyXX"); - slavebuf[strlen("/dev/pty")] = *cp; - slavebuf[strlen("/dev/ptyp")] = '0'; + slavebuf[sizeof("/dev/pty") - 1] = *cp; + slavebuf[sizeof("/dev/ptyp") - 1] = '0'; if (stat(slavebuf, &stb) < 0) break; for (i = 0; i < 16; i++) { @@ -125,14 +121,13 @@ close(slavefd); if (*fd < 0) continue; /* got pty */ - slavebuf[strlen("/dev/")] = 't'; - if ( strlen(slavebuf) > slavelength ) { - close ( *fd); + slavebuf[sizeof("/dev/") - 1] = 't'; + if (strlen(slavebuf) > slavelength -1) { + close(*fd); *fd = -1; -return PTY_GETPTY_SLAVE_TOOLONG; + return PTY_GETPTY_SLAVE_TOOLONG; } - strncpy ( slave, slavebuf, slavelength); - + strncpy(slave, slavebuf, slavelength); return 0; } } @@ -141,4 +136,3 @@ return PTY_GETPTY_SLAVE_TOOLONG; #endif /*HAVE__GETPTY*/ #endif /* HAVE_OPENPTY */ } - diff --git a/src/util/pty/open_slave.c b/src/util/pty/open_slave.c index 05b83b809..7d28ea264 100644 --- a/src/util/pty/open_slave.c +++ b/src/util/pty/open_slave.c @@ -55,6 +55,8 @@ long pty_open_slave ( slave, fd) #endif + if (slave == NULL || *slave == '\0') + return PTY_OPEN_SLAVE_TOOSHORT; if (chmod(slave, 0)) return PTY_OPEN_SLAVE_CHMODFAIL; if ( chown(slave, 0, 0 ) == -1 ) diff --git a/src/util/pty/pty_err.et b/src/util/pty/pty_err.et index bcdecf4d2..08c126d62 100644 --- a/src/util/pty/pty_err.et +++ b/src/util/pty/pty_err.et @@ -21,7 +21,7 @@ error_table pty - error_code PTY_GETPTY_STREAMS, "Failed to unlock or grant streams pty." +error_code PTY_GETPTY_STREAMS, "Failed to unlock or grant streams pty." error_code PTY_GETPTY_FSTAT, "fstat of master pty failed" @@ -42,3 +42,4 @@ error_code PTY_OPEN_SLAVE_PUSH_FAIL, "Failed to push stream on slave side of pty error_code PTY_OPEN_SLAVE_REVOKEFAIL, "Failed to revoke slave side of pty" error_code PTY_UPDATE_UTMP_PROCTYPE_INVALID, "bad process type passed to pty_update_utmp" +error_code PTY_OPEN_SLAVE_TOOSHORT, "Slave pty name is zero-length" diff --git a/src/util/pty/update_utmp.c b/src/util/pty/update_utmp.c index 9effab134..3b1f74185 100644 --- a/src/util/pty/update_utmp.c +++ b/src/util/pty/update_utmp.c @@ -137,8 +137,14 @@ long pty_update_utmp (process_type, pid, username, line, host, flags) utx.ut_type = ent.ut_type; #ifdef UT_EXIT_STRUCTURE_DIFFER utx.ut_exit.ut_exit = ent.ut_exit.e_exit; +#else +/* KLUDGE for now; eventually this will be a feature test... See PR#[40] */ +#ifdef __hpux + utx.ut_exit.__e_termination = ent.ut_exit.e_termination; + utx.ut_exit.__e_exit = ent.ut_exit.e_exit; #else utx.ut_exit = ent.ut_exit; +#endif #endif utx.ut_tv.tv_sec = ent.ut_time; utx.ut_tv.tv_usec = 0; diff --git a/src/util/pty/update_wtmp.c b/src/util/pty/update_wtmp.c index c2f9461ec..7f6890230 100644 --- a/src/util/pty/update_wtmp.c +++ b/src/util/pty/update_wtmp.c @@ -40,6 +40,7 @@ long ptyint_update_wtmp (ent , host, user) struct utmp ut; struct stat statb; int fd; + time_t uttime; #ifdef HAVE_UPDWTMPX struct utmpx utx; @@ -71,7 +72,8 @@ long ptyint_update_wtmp (ent , host, user) #ifndef NO_UT_HOST (void)strncpy(ut.ut_host, ent->ut_host, sizeof(ut.ut_host)); #endif - (void)time(&ut.ut_time); + (void)time(&uttime); + ut.ut_time = uttime; #if defined(HAVE_GETUTENT) && defined(USER_PROCESS) if (ent->ut_name) { if (!ut.ut_pid) diff --git a/src/util/send-pr/Makefile.in b/src/util/send-pr/Makefile.in index 0c7146165..2f2953977 100644 --- a/src/util/send-pr/Makefile.in +++ b/src/util/send-pr/Makefile.in @@ -1,7 +1,7 @@ # # Makefile for building a standalone send-pr. # -RELEASE=1.0 +RELEASE=1.0pl1 SUBMITTER=net sendprname = krb5-send-pr EMACS=emacs @@ -24,21 +24,19 @@ install-sid: install-sid.sh sed -e 's,@ADMIN_BINDIR@,$(ADMIN_BINDIR),g' $(srcdir)/install-sid.sh > install-sid install:: all - if [ -d $(prefix) ]; then true ; else mkdir $(prefix) ; fi - if [ -d $(ADMIN_BINDIR) ]; then true ; else mkdir $(ADMIN_BINDIR) ; fi - cp send-pr $(ADMIN_BINDIR)/$(sendprname) - chmod 755 $(ADMIN_BINDIR)/$(sendprname) - cp install-sid $(ADMIN_BINDIR) - chmod 755 $(ADMIN_BINDIR)/install-sid - if [ -d $(datadir) ] ; then true ; else mkdir $(datadir) ; fi - if [ -d $(datadir)/gnats ] ; then true ; else mkdir $(datadir)/gnats ; fi - cp $(srcdir)/categories $(datadir)/gnats/mit - chmod 644 $(datadir)/gnats/mit - -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ + if [ -d $(DESTDIR)$(prefix) ]; then true ; else mkdir $(DESTDIR)$(prefix) ; fi + if [ -d $(DESTDIR)$(ADMIN_BINDIR) ]; then true ; else mkdir $(DESTDIR)$(ADMIN_BINDIR) ; fi + cp send-pr $(DESTDIR)$(ADMIN_BINDIR)/$(sendprname) + chmod 755 $(DESTDIR)$(ADMIN_BINDIR)/$(sendprname) + if [ -d $(DESTDIR)$(datadir) ] ; then true ; else mkdir $(DESTDIR)$(datadir) ; fi + if [ -d $(DESTDIR)$(datadir)/gnats ] ; then true ; else mkdir $(DESTDIR)$(datadir)/gnats ; fi + cp $(srcdir)/categories $(DESTDIR)$(datadir)/gnats/mit + chmod 644 $(DESTDIR)$(datadir)/gnats/mit + -parent=`echo $(DESTDIR)$(man1dir)|sed -e 's@/[^/]*$$@@'`; \ if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi - if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi - cp $(srcdir)/send-pr.1 $(man1dir)/$(sendprname).1 - chmod 644 $(man1dir)/$(sendprname).1 + if [ -d $(DESTDIR)$(man1dir) ] ; then true ; else mkdir $(DESTDIR)$(man1dir) ; fi + sed -e 's/send-pr/$(sendprname)/g' $(srcdir)/send-pr.1 > $(DESTDIR)$(man1dir)/$(sendprname).1 + chmod 644 $(DESTDIR)$(man1dir)/$(sendprname).1 clean:: rm -f install-sid send-pr send-pr.el* diff --git a/src/util/send-pr/send-pr.sh b/src/util/send-pr/send-pr.sh index 96a9c2448..e15ea5dfe 100644 --- a/src/util/send-pr/send-pr.sh +++ b/src/util/send-pr/send-pr.sh @@ -55,22 +55,30 @@ GNATS_SITE=mit # What mailer to use. This must come after the config file, since it is # host-dependent. -MAIL_AGENT="/usr/sbin/sendmail -oi -t" -if [ ! -x `echo $MAIL_AGENT|sed 's/ .*//'` ] ; then - ( [ -x /usr/lib/sendmail ] && MAIL_AGENT="/usr/lib/sendmail -oi -t" ) || \ - ( [ -x /usr/sbin/sendmail ] && MAIL_AGENT="/usr/sbin/sendmail -oi -t " ) || \ - MAIL_AGENT="sendmail -oi -t " -fi +for dir in /usr/lib /usr/sbin /usr/ucblib; do + if test -f $dir/sendmail; then + MAIL_AGENT="$dir/sendmail -oi -t" + break + fi +done # How to read the passwd database. PASSWD="cat /etc/passwd" +if test -f /bin/domainname && test -n "`/bin/domainname`"; then + if test -f /usr/bin/niscat && + /usr/bin/niscat passwd.org_dir > /dev/null 2>&1; then + PASSWD="/usr/bin/niscat passwd.org_dir" + elif test -f /usr/bin/ypcat && /usr/bin/ypcat passwd > /dev/null 2>&1; then + PASSWD="/usr/bin/ypcat passwd" + fi +fi -ECHON=bsd +# Figure out how to do "echo -n" -if [ $ECHON = bsd ] ; then +if test "`echo -n foo`" = foo; then ECHON1="echo -n" ECHON2= -elif [ $ECHON = sysv ] ; then +elif test "`echo 'foo\c'`" = foo; then ECHON1=echo ECHON2='\c' else diff --git a/src/windows/cns/ChangeLog b/src/windows/cns/ChangeLog index 3ca9e9607..6526c65e0 100644 --- a/src/windows/cns/ChangeLog +++ b/src/windows/cns/ChangeLog @@ -1,3 +1,11 @@ +Sat Nov 23 00:26:44 1996 Theodore Ts'o + + * Makefile.in (KLIB): Change krb516.dll to krb5_16.dll. [PR#204] + +Wed Nov 20 18:32:06 1996 Theodore Y. Ts'o + + * Makefile.in (KLIB): Change libkrb5.dll to be krb516.dll + Wed Jun 12 00:20:08 1996 Theodore Ts'o * makefile: Renamed to Makefile.in, so that we can do WIN16/WIN32 diff --git a/src/windows/cns/Makefile.in b/src/windows/cns/Makefile.in index 3fae32b43..9b3347fd2 100644 --- a/src/windows/cns/Makefile.in +++ b/src/windows/cns/Makefile.in @@ -1,8 +1,8 @@ # makefile: Constructs the Kerberos for Windows ticket manager # Works for both k4 and k5 releases. # -NAME = cns -OBJS = $(NAME).obj tktlist.obj +NAME = krb5 +OBJS = cns.obj tktlist.obj ##### Options DEBUG = 1 @@ -23,7 +23,7 @@ XOBJS = !if $(KVERSION) == 5 BUILDTOP =..\.. LIBDIR = $(BUILDTOP)\lib -KLIB = $(LIBDIR)\libkrb5.lib +KLIB = $(LIBDIR)\krb5_16.lib WLIB = $(LIBDIR)\winsock.lib INCLUDES = /I$(BUILDTOP)\include /I$(BUILDTOP)\include\krb5 XOBJS = kpasswd.obj @@ -56,10 +56,10 @@ LFLAGS = /nologo /nod /nopackcode all:: makefile $(NAME).exe -$(NAME).exe: $*.def $*.res $(OBJS) $(XOBJS) $(LIBS) +$(NAME).exe: $*.def cns.res $(OBJS) $(XOBJS) $(LIBS) $(LINK) $(LFLAGS) $(OBJS) $(XOBJS), $@, $*.map, \ $(LIBS) $(SYSLIBS), $*.def - $(RC) $(RFLAGS) /k $*.res $@ + $(RC) $(RFLAGS) /k cns.res $@ install: copy $(NAME).exe ..\floppy @@ -73,9 +73,9 @@ clean:: if exist *.err del *.err if exist ..\floppy\$(NAME).exe del ..\floppy\$(NAME).exe -$(OBJS) $(NAME).res: $(NAME).h tktlist.h +$(OBJS) cns.res: cns.h tktlist.h -$(NAME).res: clock00.ico clock05.ico clock10.ico clock15.ico clock20.ico \ +cns.res: clock00.ico clock05.ico clock10.ico clock15.ico clock20.ico \ clock25.ico clock30.ico clock35.ico clock40.ico clock45.ico \ clock50.ico clock55.ico clock60.ico clockexp.ico clocktkt.ico \ cns.ico diff --git a/src/windows/cns/cns.c b/src/windows/cns/cns.c index 6d6af861d..e5969a11c 100644 --- a/src/windows/cns/cns.c +++ b/src/windows/cns/cns.c @@ -47,7 +47,9 @@ #define MAX_KPW_LEN 128 /* include space for '.' and '@' */ #define MAX_K_NAME_SZ (ANAME_SZ + INST_SZ + REALM_SZ + 2) +#ifdef CYGNUS #define ORGANIZATION "Cygnus Support" +#endif #define CREDENTIALS char #endif @@ -2139,9 +2141,11 @@ kwin_command ( strcpy(copyright, " Kerberos 5 for Windows\n"); #endif strcat(copyright, "\n Version 1.00\n\n"); +#ifdef CYGNUS strcat(copyright, " For support, contact:\n"); strcat(copyright, ORGANIZATION); strcat(copyright, " - (415) 903-1400"); +#endif MessageBox(hwnd, copyright, "Kerberos", MB_OK); return TRUE; diff --git a/src/windows/cns/cns.def b/src/windows/cns/krb5.def similarity index 72% rename from src/windows/cns/cns.def rename to src/windows/cns/krb5.def index 01fd7f5ea..6a88ffbb9 100644 --- a/src/windows/cns/cns.def +++ b/src/windows/cns/krb5.def @@ -1,5 +1,5 @@ -NAME CNS -DESCRIPTION 'CNS - Cygnus Network Security' +NAME KRB5 +DESCRIPTION 'KRB5 - Credentials Manager' EXETYPE WINDOWS STUB 'WINSTUB.EXE' SEGMENTS _TEXT CLASS 'CODE' PRELOAD diff --git a/src/windows/gss/ChangeLog b/src/windows/gss/ChangeLog index 5681c50fa..b2fa4d7b3 100644 --- a/src/windows/gss/ChangeLog +++ b/src/windows/gss/ChangeLog @@ -1,7 +1,13 @@ +Fri Nov 22 15:52:55 1996 unknown + + * gss-client.c (connect_to_server): use sizeof instead of h_length + to determine number of bytes of addr to copy from DNS response + [krb5-misc/211] + Tue Oct 29 10:17:25 1996 Theodore Y. Ts'o * gss-client.c (client_establish_context): Fix typo; service_name - really should be nt_service_name. + really should be nt_service_name. Thu Jul 25 02:16:56 1996 Theodore Y. Ts'o diff --git a/src/windows/gss/gss-client.c b/src/windows/gss/gss-client.c index 0a98774b4..d5e8972b3 100644 --- a/src/windows/gss/gss-client.c +++ b/src/windows/gss/gss-client.c @@ -154,7 +154,7 @@ connect_to_server (char *host, u_short port) } saddr.sin_family = hp->h_addrtype; - memcpy((char *)&saddr.sin_addr, hp->h_addr, hp->h_length); + memcpy((char *)&saddr.sin_addr, hp->h_addr, sizeof(saddr.sin_addr)); saddr.sin_port = htons(port); if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) { diff --git a/src/windows/wintel/ChangeLog b/src/windows/wintel/ChangeLog index 521c68f58..aeb3dc8e3 100644 --- a/src/windows/wintel/ChangeLog +++ b/src/windows/wintel/ChangeLog @@ -1,3 +1,16 @@ +Tue Apr 8 11:22:23 1997 Theodore Ts'o + + * screen.c (ScreenWndProc): Remove Cygnus/KerbNet from the help + screen. [krb5-clients/309] + +Sat Nov 23 00:27:45 1996 Theodore Ts'o + + * Makefile.in (KLIB): Change krb516.dll to krb5_16.dll. [PR#204] + +Wed Nov 20 18:32:26 1996 Theodore Y. Ts'o + + * Makefile.in (KLIB): Change libkrb5.dll to be krb516.dll + Wed Jun 12 00:22:02 1996 Theodore Ts'o * makefile: Renamed to Makefile.in, so that we can do WIN16/WIN32 diff --git a/src/windows/wintel/Makefile.in b/src/windows/wintel/Makefile.in index 7134945df..5f49bcf6e 100644 --- a/src/windows/wintel/Makefile.in +++ b/src/windows/wintel/Makefile.in @@ -24,7 +24,7 @@ XOBJS = !if $(KVERSION) == 5 BUILDTOP =..\.. LIBDIR = $(BUILDTOP)\lib -KLIB = $(LIBDIR)\libkrb5.lib +KLIB = $(LIBDIR)\krb5_16.lib WLIB = $(LIBDIR)\winsock.lib INCLUDES = /I$(BUILDTOP)\include /I$(BUILDTOP)\include\krb5 \ /I$(BUILDTOP)\lib\crypto\des diff --git a/src/windows/wintel/screen.c b/src/windows/wintel/screen.c index 4945013de..505f23599 100644 --- a/src/windows/wintel/screen.c +++ b/src/windows/wintel/screen.c @@ -694,16 +694,21 @@ long FAR PASCAL ScreenWndProc( break; case IDM_ABOUT: - #ifdef KRB4 - strcpy(strTmp, " Kerberos 4 for Windows\n"); - #endif - #ifdef KRB5 - strcpy(strTmp, " Kerberos 5 for Windows\n"); - #endif +#ifdef CYGNUS +#ifdef KRB4 + strcpy(strTmp, " Kerberos 4 for Windows\n"); +#endif +#ifdef KRB5 + strcpy(strTmp, " Kerberos 5 for Windows\n"); +#endif strcat(strTmp, "\n Version 1.00\n\n"); strcat(strTmp, " For support, contact:\n"); strcat(strTmp, "Cygnus Support"); strcat(strTmp, " - (415) 903-1400"); +#else + strcpy(strTmp, " Kerberos 5 Telnet for Windows\n"); + strcat(strTmp, "\n Version 1.00\n\n"); +#endif MessageBox(NULL, strTmp, "Kerberos", MB_OK); break; -- 2.26.2