Tom Yu [Tue, 8 May 2001 04:28:33 +0000 (04:28 +0000)]
* cleanup.c: Call update_utmp() with the correct pid to assist in
finding the old utmp entry.
* open_ctty.c: Reformat somewhat and revise comment.
* open_slave.c: Rework significantly. Primarily, keep a fd open
to the slave if we need to reopen the slave device following
vhangup() or revoke(), to accommodate various OS quirks.
* update_utmp.c: Revise history section somewhat to document more
HP-UX brokenness. Search via ut_pid before searching via
ut_line. Copy stuff around because entuxent() will clobber some
things.
* void_assoc.c: Revise comment and reformat somewhat.
Ken Raeburn [Tue, 8 May 2001 03:50:53 +0000 (03:50 +0000)]
* locate_kdc.c (add_sockaddr_to_list) [TEST]: If getnameinfo is available, use
it instead of inet_ntoa to get the printable address.
(add_host_to_list): Share declaration sections as much as possible. Propagate
errors back correctly from gethostbyname path.
Ezra Peisach [Thu, 3 May 2001 18:41:20 +0000 (18:41 +0000)]
* cleanup.c (pty_cleanup): Delcare local variable only if
VHANG_LAST defined.
* logwtmp.c (pty_logwtmp): Only declare local variables if
logwtmp() not available on system.
* sane_hostname.c (sockaddrlen): Only define static function if
HAVE_GETNAMEINFO defined. (pty_make_sane_hostname) Declare goto
target only if code compiled in.
Tom Yu [Mon, 30 Apr 2001 21:53:15 +0000 (21:53 +0000)]
* configure.in: Fix some quoting of shell variables when passing
to "test". Reorder some logic in consistency checks to validate
cache variables against "yes" to account for possible empty or
nonexistent values.
* pty-int.h: Fix conditional prototype of update_wtmp().
* update_wtmp.c: Fix conditional compilation of update_wtmp() to
cover the case where we have setutxent() but don't have updwtmpx()
and WTMPX_FILE, as is the case on some Linux installations.
Tom Yu [Sat, 28 Apr 2001 02:05:38 +0000 (02:05 +0000)]
* configure.in: Many changes to support the rewriting of the utmp
pieces of libpty. Do a large amount of checking for consistency
of various utmp and utmpx APIs as currently understood. See rant
in update_utmp.c.
* dump-utmp.c: Rewrite; now has capability to use utmp{,x}name()
to extract entries from utmp and utmpx files. Adjusts field
widths when printing as appropriate.
* libpty.h: Update call signature for update_utmp() and logwtmp();
make prototypes unconditional.
* logwtmp.c: Rewrite. Use pututline() or pututxline() API
whenever possible.
* pty-int.h: Update call signatures for update_wtmp{,x}(); make
prototypes unconditional.
* sane_hostname.c: Use the autoconf-correct macro names.
* update_utmp.c: Rewrite. Basically, use functions from the
pututline() or pututxline() API whenever possible, to avoid
lossage. Inserted large rant about the conjectured history of BSD
utmp, sysV utmp, and utmpx, as well as documentation about some
known quirks.
* update_wtmp.c: Rewrite. Add new function ptyint_logwtmpx() that
takes a utmpx rather than a utmp, so it can fail to lose data
converting to and from utmp.
Ken Raeburn [Fri, 27 Apr 2001 22:51:51 +0000 (22:51 +0000)]
* aclocal.m4 (DECLARE_SYS_ERRLIST): Check for sys_nerr with an
expression that can't be optimized away.
(KRB5_INIT_CCOPTS): New macro.
(WITH_CC): Add gcc warning flags to CCOPTS instead of CC. Add option
-Wno-comment to stop gcc from complaining about SunOS system header
files. Call AC_REQUIRE on KRB5_INIT_CCOPTS.
(WITH_CCOPTS): Add to CCOPTS instead of simply assigning to it. Call
AC_REQUIRE on KRB5_INIT_CCOPTS.
* aclocal.m4 (WITH_CC): Reorganize test: Do not use cache variable
that conflicts with an autoconf internal variable (prefix with
krb5_ instead of ac_). Ensure that the first time AC_PROG_CC is
invoked, is not within a conditional cache block. Autoconf 2.49
only include the compiler test code once in the configure script
instead of everytime it is seen.
aclocal now works with autoconf-2.49d... (as well as earlier versions)
Ken Raeburn [Tue, 10 Apr 2001 05:06:19 +0000 (05:06 +0000)]
* des.h (des_cblock, des_key_schedule): Separate definitions into a block with
a comment indicating lib/crypto/des/des_int.h needs to be kept in sync. Use
macro KRB5INT_DES_TYPES_DEFINED to avoid duplication.
Ken Raeburn [Tue, 10 Apr 2001 05:03:55 +0000 (05:03 +0000)]
* des_int.h: Don't use PROTOTYPE macro.
(des_cblock, des_key_schedule): Duplicate definitions here and in
kerberosIV/des.h, using macro KRB5INT_DES_TYPES_DEFINED to avoid duplication.
(mit_des_cblock, mit_des_key_schedule): Define in terms of the other types for
now.
(PROTOTYPE): Don't define.
Ken Raeburn [Tue, 10 Apr 2001 02:47:42 +0000 (02:47 +0000)]
* des425.h: Deleted to avoid confusion with the other des.h in the tree. All
files changed to include des_int.h and (the other) des.h instead.
* new_rnd_key.c (des_init_random_number_generator): Cast seed data pointer to
keep compiler happy.
* read_passwd.c (intr_routine, des_read_pw_string): Add prototypes.
(des_read_password): Fix call sequence for des_string_to_key.
* str_to_key.c (des_string_to_key): Remove static storage in favor of automatic
storage. Fix call sequence to des_key_sched. Delete no-op while loop.
* t_quad.c (main): Fix call sequence for des_quad_cksum.
* verify.c (des_string_to_key, des_key_sched, des_ecb_encrypt,
des_cbc_encrypt): Removed declarations.
(do_encrypt, do_decrypt): Prototype. Make args point to unsigned char, and
return types void.
(main): Declare return type. Make automatic var in_length be unsigned long;
discard some casts, but cast it when passing to memcmp. Remove extra arg
passed to des_cbc_cksum.
(flip): Delete unused function.
Tom Yu [Thu, 5 Apr 2001 00:29:16 +0000 (00:29 +0000)]
* mk_safe.c (krb5_mk_safe): Only use safe_cksumtype from the
auth_context (derived from the config file or hardcoded default)
if it's suitable for the enctype of the key we're going to
use. [pullup from krb5-1-2-2-branch]
Tom Yu [Wed, 4 Apr 2001 02:31:56 +0000 (02:31 +0000)]
* setenv.c: Add conditionals for compilation of setenv, unsetenv,
and getenv such that they only get compiled if they don't already
exist. [pullup from krb5-1-2-2-branch]
Tom Yu [Wed, 4 Apr 2001 02:31:35 +0000 (02:31 +0000)]
* configure.in: Add checks for unsetenv and getenv. Compile
setenv.o if any of setenv, unsetenv, or getenv are
missing. [pullup from krb5-1-2-2-branch]
Tom Yu [Wed, 4 Apr 2001 02:31:12 +0000 (02:31 +0000)]
* configure.in: Check for setenv, unsetenv, and getenv. Compile
setenv.c if at least of these is undefined. [pullup from
krb5-1-2-2-branch]
* setenv.c: Add conditionals for compilation of setenv, unsetenv,
and getenv such that they only get compiled if they don't already
exist. [pullup from krb5-1-2-2-branch]
Ken Raeburn [Sat, 31 Mar 2001 05:23:42 +0000 (05:23 +0000)]
* init_ctx.c (DEFAULT_ETYPE_LIST): New macro. Old etype list, plus des-md4,
with des-crc before des-mdX for now.
(get_profile_etype_list): Use DEFAULT_ETYPE_LIST.