Ezra Peisach [Thu, 7 Jun 2001 15:17:19 +0000 (15:17 +0000)]
* k5-int.h: Remove AS_REP_105_SAM_COMPAT definition. Not used in
tree. Remove SYSV redefinition of random() to rand() and
srandom() to srand(). Two locations in tree that might matter
already handled in configure. Unicos redefinition of utimes() to
utime() removed - appl/bsd has its own implementation.
Ezra Peisach [Wed, 6 Jun 2001 18:51:22 +0000 (18:51 +0000)]
* test.c (print_key): Pass in des_cblock* instead of char *.
(krb5_print_keyblock): Cast argument to C_Block_print to des_cblock *.
(krb4_print_ticket): For printf formats expecting a long, cast
arguments as such.
Ezra Peisach [Wed, 6 Jun 2001 18:06:36 +0000 (18:06 +0000)]
* ftpcmd.y: Include "ftpd_var.h" and remove prototype for reply()
and lreply(). Add prototypes and declare as returning void
sizecmd(), help() and yylex(). Cleanup assignments in
conditionals.
* ftpd.c: Include <grp.h> for initgroups() prototype. Move
reply(), lreply() prototypes to ftpd_var.h (and include
same). Include "krb524.h" for krb524_convert_creds_kdc()
prototype. Include secure.h. Provide static prototypes for
ftpd_gss_convert_creds(), ftpd_gss_userok(), dolog(),
receive_data(), login(), end_login(), disallowed_user(),
restricted_user(), checkuser(). Declare main(), checkuser(),
disallowed_user(), restricted_user(), end_login(), kpass(),
retreive_data(), auth_data(), secure_printf(), ftpd_gss_userok(),
as returning int. Declare setdlevel(), user(), pass(), login(),
retreive(), store_file(), secure_error(), statfilecmd(),
stat_cmd(), fatal(), reply(), lreply(), ack(), nack(), yyerror(),
delete_file(), cwd(), makedir(), removedir(), pwd(), renamecmd(),
dolog(), dologout(), passive(), perror_reply(), auth(),
send_file_list(), reply_gss_error(), secure_gss_error(),
ftpd_gss_convert_creds(), as returning void. Cleanup printf
argument mismatches.
* ftpd_var.h: New header file with many prototypes from ftpd.c.
* popen.c (ftpd_popen): Add parenthesis in conditional to
distinguish || vs &&. Add prototype for blkfree().
(ftpd_pclose): Declare as returning int.
Ken Raeburn [Tue, 5 Jun 2001 23:56:28 +0000 (23:56 +0000)]
* krb524d.c: Include stdarg.h.
(main): Accept new argument -p to indicate port number to use; fall back to
KRB524_SERVICE and then KRB524_PORT. In error messages, use only part of
program name following last '/'.
(usage): Updated.
(krb5_free_keyblock_contents): Delete disabled function.
Ezra Peisach [Thu, 31 May 2001 17:47:51 +0000 (17:47 +0000)]
* des.c (des_ecb_encrypt): Do not use a variable named "encrypt".
* enc_dec.c (des_cbc_encrypt): Likewise.
* pcbc_encrypt.c (des_pcbc_encrypt): Likewise.
Ezra Peisach [Thu, 31 May 2001 17:38:03 +0000 (17:38 +0000)]
* k5_md4des.c (k5_md4des_verify): Get rid of local variable that
is assigned to, without side effects, but never used.
* k5_md5des.c (k5_md5des_verify): Likewise.
Ezra Peisach [Wed, 30 May 2001 18:44:44 +0000 (18:44 +0000)]
* krb5-config.in: New script for providing linker and compiler
information for applications.
* patchlevel.h: Update to current release. Mkrel script generates
this in distribtions.
* configure.in: Add support for parsing patchlevel.h into a
useable form for krb5-config. Generate krb5-config from
krb5-config.in. Add KRB5_BUILD_PROGRAM for variable substitution.
* Makefile.in: Add support for building and installing krb5-config.
Tom Yu [Fri, 25 May 2001 21:40:08 +0000 (21:40 +0000)]
* krlogind.c (protocol): Don't do TIOCPKT on systems with STREAMS
ptys, even if there is a TIOCPKT, since it may result in hangs on
some systems where BSD packet mode is (presumably) not implemented
properly, such as AIX 4.3.3. Should get cleaned up at some later
point to actually I_PUSH "pckt" or equivalent and do translation
between STREAMS and BSD style packet mode.
Ezra Peisach [Wed, 23 May 2001 22:16:00 +0000 (22:16 +0000)]
* aclocal.m4 (WITH_CC, WITH_CCOPTS): Autoconf 2.50 fix. Change
from define to AC_DEFUN. Autoconf warns of use of AC_REQUIRE
outside such as environment.
Tom Yu [Wed, 16 May 2001 02:55:51 +0000 (02:55 +0000)]
* getpty.c: Make pty_getpty() into ptyint_getpty_ext(), which has
an extra argument that determines whether to call grantpt() and
unlockpt() on systems that support it. The new pty_getpty() will
simply call the extended version. This is to support some
wackiness needed by pty_paranoia.c tests.
* pty-int.h: Add prototype for ptyint_getpty_ext().
* pty_paranoia.c: Add rant about ptys and quirks therein. Needs
to be updated somewhat. Add some more paranoia for the case where
we actually succeed in opening the slave of a closed master and
then succeed in opening the same master. This program will get
rewritten at some point to actually see what things result in EOFs
and under what conditions data will actually get passed between
master and slave.
Tom Yu [Wed, 9 May 2001 03:38:37 +0000 (03:38 +0000)]
* logwtmp.c: Delete code under "#if 0". Fix reversed test for
loggingin. Don't forget to set the ut_tv or ut_time for the
entry.
* update_utmp.c: Update rant about Tru64; remove fetching of
ut_user from old entry. The existence of the old ut_user in the
logout entry in wtmp was confusing last.
* util_token.c (g_make_token_header): Remove incorrect cast of
length argument to memcpy.
* oid_ops.c (generic_gss_str_to_oid): Cast argument of isxxx()
functions to int - avoids gcc warning when these are implemented
as macros indexing an array.
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.