[Heimdal-source-changes] [heimdal/heimdal] dba026: Introduce and apply krb5_storage_from_socket

GitHub noreply at github.com
Ons Feb 5 05:20:59 CET 2014


  Branch: refs/heads/master
  Home:   https://github.com/heimdal/heimdal
  Commit: dba026b5ef703d625abd7c5d2471bb474f6b8128
      https://github.com/heimdal/heimdal/commit/dba026b5ef703d625abd7c5d2471bb474f6b8128
  Author: Jeffrey Altman <jaltman at secure-endpoints.com>
  Date:   2014-02-04 (Tue, 04 Feb 2014)

  Changed paths:
    M appl/gssmask/gssmaestro.c
    M appl/gssmask/gssmask.c
    M kadmin/rpc.c
    M lib/kadm5/private.h
    M lib/kadm5/send_recv.c
    M lib/krb5/Makefile.am
    M lib/krb5/NTMakefile
    M lib/krb5/libkrb5-exports.def.in
    M lib/krb5/store_emem.c
    M lib/krb5/store_fd.c
    M lib/krb5/store_mem.c
    A lib/krb5/store_sock.c
    M lib/krb5/version-script.map

  Log Message:
  -----------
  Introduce and apply krb5_storage_from_socket

On Windows a file descriptor is an int value allocated by the
local module instance of the C Run Time Library.  A socket handle is a
SOCKET value allocated by a Winsock Provider for the requested family and
protocol.   These two values cannot be mixed and there is no mechanism for
converting between the two.   The _get_osfhandle() and _open_osfhandle()
functions can work with a standard HANDLE (file, pipe, etc) but cannot be
used for a SOCKET.

The Heimdal krb5_storage_from_fd() routine counted on the osf conversion
functions working on SOCKET values.  Since they do not any attempt to call
krb5_storage_from_fd() on a socket resulted in an assertion being thrown
by the C RTL.

Another problem is SOCKET value truncation when storing a 64-bit value
into a 32-bit int.

To address these problems a new krb5_storage_from_socket() routine is
introduced.  This routine setups a krb5_storage that stores a socket value
as a rk_socket_t and provides a set of helper routines that always use
network ready functions.

The krb5_storage_from_fd() routines no longer use net_read() and
net_write() but provide helpers that follow their logic so that pipes can
be processed.

All call sites that allocate a socket now store the socket as rk_socket_t
and call krb5_storage_from_socket().

All locations that previously called the bare close() on a socket value
now call rk_closesocket().

Change-Id: I045f775b2a5dbf5cf803751409490bc27fffe597


  Commit: d9bc25619969be8938c828dcbed79d1c83ee08dc
      https://github.com/heimdal/heimdal/commit/d9bc25619969be8938c828dcbed79d1c83ee08dc
  Author: Jeffrey Altman <jaltman at secure-endpoints.com>
  Date:   2014-02-04 (Tue, 04 Feb 2014)

  Changed paths:
    M include/bits.c

  Log Message:
  -----------
  define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE

Always define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE even if attributes are
not supported.

Change-Id: Ibc2110d809d81f546723853038c69176075d6013


  Commit: 8de592ab5a39c48381c1cd5d4b32f6f2b7e6864b
      https://github.com/heimdal/heimdal/commit/8de592ab5a39c48381c1cd5d4b32f6f2b7e6864b
  Author: Jeffrey Altman <jaltman at secure-endpoints.com>
  Date:   2014-02-04 (Tue, 04 Feb 2014)

  Changed paths:
    M lib/krb5/plugin.c

  Log Message:
  -----------
  improve resolve_origin readability

comment the HAVE_DLADDR preprocessor #else and #endif
because they are so many lines apart.

indent the strrchr() call after the _Win32 block to demonstrate
they are related.

Change-Id: I112dc91b350b277cdb1dc1cd3ccd8f31a2084409


  Commit: 3e2ca4be373398a0dd91043e5b48989271a17ccc
      https://github.com/heimdal/heimdal/commit/3e2ca4be373398a0dd91043e5b48989271a17ccc
  Author: Jeffrey Altman <jaltman at secure-endpoints.com>
  Date:   2014-02-04 (Tue, 04 Feb 2014)

  Changed paths:
    M lib/ntlm/ntlm.c

  Log Message:
  -----------
  min instead of MIN

The MIN macro is not defined everywhere.  use min().

Change-Id: I47413080364e215ad2a2075403b224867deba037


  Commit: e52c5f2a6469921056e39e69a7f88691bd290121
      https://github.com/heimdal/heimdal/commit/e52c5f2a6469921056e39e69a7f88691bd290121
  Author: Jeffrey Altman <jaltman at secure-endpoints.com>
  Date:   2014-02-04 (Tue, 04 Feb 2014)

  Changed paths:
    M packages/windows/installer/heimdal-command.wxs
    M packages/windows/installer/heimdal-installer.wxs

  Log Message:
  -----------
  Windows packaging: install kadmin.exe

Now that kadmin.exe works on Windows, install it.

Change-Id: I4b5e85386bd6e39ac1a8e01cd6d323c09520da1a


Compare: https://github.com/heimdal/heimdal/compare/fdabfd60402b...e52c5f2a6469


More information about the Heimdal-source-changes mailing list