Ken Raeburn [Thu, 30 Aug 2001 19:31:21 +0000 (19:31 +0000)]
* fake-addrinfo.h (AI_V4MAPPED, AI_ADDRCONFIG, AI_ALL, AI_DEFAULT): Define as
bogus values, since they're part of getipnodeby* API, not getaddrinfo API.
Ken Raeburn [Thu, 30 Aug 2001 03:44:03 +0000 (03:44 +0000)]
* telnet.c (setupterm): Now static.
(suboption): Rename local variable "ospeed" to "o_speed" to avoid conflict with
global.
(env_opt_add): Cast opt_welldefined argument to char * to silence warning.
Ezra Peisach [Fri, 10 Aug 2001 15:20:16 +0000 (15:20 +0000)]
* clnt_udp.c (clntudp_call): Do not assume that select will not
change the timeout struct timeval. Under Linux, this reflects the
time left available - which might result in 0 in the case of a
timeout. When attempting to resend a request, this may results in
a timeout of zero - flooding the server with replay requests.
* clnt_tcp.c (readtcp): Same.
* pmap_rmt.c (clnt_broadcast): Same
* svc_tcp.c (readtcp): Same
Ezra Peisach [Tue, 7 Aug 2001 21:47:36 +0000 (21:47 +0000)]
* post.in (all-recurse clean-recurse distclean-recurse
install-recurse check-recurse Makefiles-recurse): Do not pass down
CC and CCOPTS to subdirs. This causes automatic reconfiguration to
fail with autoconf 2.52 where config.status is invoked with
different environment variables.
Ezra Peisach [Mon, 6 Aug 2001 18:24:56 +0000 (18:24 +0000)]
* default.exp (setup_root_shell): Also recognize "nection reset by
peer" as a failure to get a root shell. This happens if
tcp_wrappers are in use in inetd.conf, but rlogind is not prsent
on the machine.
Mitchell Berger [Fri, 3 Aug 2001 07:46:05 +0000 (07:46 +0000)]
* ftpd.c (main): Convert to do option parsing with getopt() rather
than the whitespace-sensitive voodoo we've used in the past. This
fixes a bug where use of -u to set a default umask silently failed and
granted more permission on files than desired if the -u and the mode
were separated by a space, and likely many other such bugs.
Tom Yu [Thu, 2 Aug 2001 22:07:00 +0000 (22:07 +0000)]
* authenc.c (net_write): Rewrite in terms of netwrite()
* configure.in: Check for vsnprintf().
* ext.h: New prototypes for netprintf, netprintf_urg,
netprintf_noflush, netwrite, netputs.
* slc.c: Fix to use new NETOBUF-handling functions.
* state.c: Fix to use new NETOBUF-handling functions.
* telnetd.c: Fix to use new NETOBUF-handling functions.
* termstat.c: Fix to use new NETOBUF-handling functions.
* utility.c: General rework to be more paranoid about
bounds-checking of NETOBUF and NFRONTP. Abstract away
interactions with NETOBUF to eliminate explicit references to
NFRONTP in many places.
(netwrite): New function; copies a buffer to the
NETOBUF "ring buffer", checking bounds and calling netflush() if
needed.
(netputs): New function; calls netwrite() with a nul-terminated
string.
(netprintf, netprintf_ext): New function; wrap sprintf() with
bounds checking for use with NETOBUF.
(netprintf_urg): New function; like netprintf() except sets neturg
to point at last char written.
(netprintf_noflush): New function; like netprintf() except
silently fails if NETOBUF is full.
(ttloop, printoption, printsub, printdata): Fix to use new
NETOBUF-handling functions.
* sendauth.c (krb5_sendauth): Instead of casting second argument
to getpeername() and getsockname() to "struct sockaddr *", cast to
system specific type as determined by autoconf.
Remove local Win32-specific definition of gss_mech_krb5.
Use GSS_C_NO_OID instead of gss_mech_krb5 for mech_type to use an
implementation specific default.
* xdr_reference.c (xdr_reference): Remove cast in argument to memset
* svc_auth_gssapi.c: In call to gss_accept_sec_context, pass
OM_uint32 * instead of int *;
* pmap_clnt.h, pmap_getport.c (pmap_getport): Prototype changed
for protocol from unsigned int to rpc_u_int32 to match struct
pmap.
* getrpcport.c (gssrpc_getrpcport): Update to reflect proper
calling conventions.
* rpc.h (callrpc): Change prototype from expecting ints for
prognum, versnum and procnum to rpc_u_int32 for consistancy.
(getrpcport): Update arguments in similar fashion.
* clnt_simple.c (gssrpc_callrpc): Update to reflect prototype change.
* auth_gssapi_misc.c (auth_gssapi_display_status_1): Local
variable msg_ctx should be OM_uint32 instead of int as argument to
gss_display_status.
* kdb.h: For structs krb5_tl_data (tl_data_length), krb5_key_data
(key-data_length), krb5_db_entry (len, e_length) change the
storage types from krb5_int16 to krb5_ui_2. This does not require
a database version change as the field sizes are the same. Remove
the code ifdefed under KRB5_OLD_AND_KRUFTY.
* rc_dfl.c (krb5_rc_io_fetch): Once length element read from
cache, and verified to be positive, put into unsigned int
variable for passing to other functions that expect such.
* asn1_k_encode.c: (asn1_encode_predicted_sam_response): Use
asn1_encode_charstring() instead of asn1_decode_octetstring()
for krb5_data. (signed vs. unsigned)
* win-pre.in, win-post.in: Move rule-printing code to win-post.in
so we get the correct build options displayed (i.e., the options
as they stand after parsing Makefile.in).
* Makefile.in, cmds.c, ftp.c, ftp_var.h, getpass.c, glob.c,
main.c, ruserpass.c, secure.c, secure.h: Quick and dirty Win32
port. Changes include using sockets more portably; changing the
method of getting username, home directory, and temporary
filenames; adding password reading code for Win32; directory
enumeration via FindNextFile() rather than readdir(); removing OUT
labels (which appear to cause problems with MSVC++ 6.0). Since
ANSI C, assume we have stdarg.h.
Ken Raeburn [Thu, 19 Jul 2001 16:40:52 +0000 (16:40 +0000)]
* fake-addrinfo.h (translate_h_errno): Supply a default value in case some
unrecognized code is returned.
(HAVE_GETNAMEINFO): Undefine before defining, just in case.
Ken Raeburn [Thu, 19 Jul 2001 14:17:19 +0000 (14:17 +0000)]
* hostaddr.c: Include fake-addrinfo.h.
(FAI_PREFIX): Define macro.
(krb5_os_hostaddr): Use getaddrinfo, to get ipv6 support and thread safety.
Support numeric addresses as well.
Ken Raeburn [Thu, 19 Jul 2001 14:03:13 +0000 (14:03 +0000)]
* klist.c (one_addr): Pass UNIX address family, not Kerberos address type, to
inet_ntop. Print different messages for unknown address types and known
address types we don't know how to print (e.g., AF_INET6 without inet_ntop).
Ken Raeburn [Thu, 19 Jul 2001 12:24:31 +0000 (12:24 +0000)]
* prof_tree.c (struct profile_iterator): Member "names" now points to const.
(profile_node_iterator_create): Argument "names" now points to const.
(profile_node_iterator): Local variable "cpp" now points to const.
* prof_int.h (profile_node_iterator_create): Decl updated.
* prof_get.c (profile_get_values): Argument "names" now points to const.
* profile.hin (profile_get_values): Decl updated.
Ken Raeburn [Thu, 19 Jul 2001 11:41:24 +0000 (11:41 +0000)]
* locate_kdc.c: Include fake-addrinfo.h.
(FAI_PREFIX, FAI_IMPLEMENTATION): Define macros.
(get_port, add_sockaddr_to_list, add_host_to_list): Drop
gethostbyname/getservbyname support, always use getnameinfo, which should be
thread-safe.
(translate_ai_error, set_port_num): Now always defined.
(set_port_num): Only check for AF_INET6 if KRB5_USE_INET6.
Ken Raeburn [Mon, 16 Jul 2001 21:16:22 +0000 (21:16 +0000)]
* string_table.c (str_INITING_KCONTEXT): Variable deleted.
* string_table.h (str_INITING_KCONTEXT): Declaration deleted.
* kadm5_create.c (kadm5_create, kadm5_create_magic_princs): Don't use
str_INITING_KCONTEXT, instead provide (different!) messages more appropriate to
the actual code.
Ken Raeburn [Mon, 16 Jul 2001 20:25:15 +0000 (20:25 +0000)]
* t_shs3.c: New test file from Marcus Watts.
(longReverse): Resurrected function long since deleted from shs.c.
* Makefile.in (check-unix, check-windows): Use t_shs3 test.
(clean): Delete it.
* shs.c (SHSTransform): Make input data pointer point to const.
(SHSUpdate): Bugfixes suggested by Marcus Watts, to fix buffer overruns, bugs
with small or odd block sizes.
Ken Raeburn [Sat, 14 Jul 2001 11:21:03 +0000 (11:21 +0000)]
* v4rcp.c (kstream_create_rcp_from_fd, kstream_create_from_fd): Allocate
correct amount of space for kstream data. (Patch from Cygnus KerbNet code,
1997.)