Commit Graph

27614 Commits

Author SHA1 Message Date
Love Hörnquist Åstrand
444f9e6568 copy news from release branch 2014-02-16 08:10:09 -08:00
Jeffrey Altman
20aaa7c37a verify_krb5_conf: add missing entries
Change-Id: I45761e046801fcdb101b82b081a7b1fe65d882ee
2014-02-14 23:41:09 -05:00
Jeffrey Altman
8676b27b26 verify_krb5_conf: sort entries, remove duplicates
Change-Id: I23dc60b4c48bcf08ed9ad687ee792366b25db3d7
2014-02-14 23:41:08 -05:00
Love Hörnquist Åstrand
01dbfac96f fix warnings 2014-02-14 19:45:46 -08:00
Love Hörnquist Åstrand
f2e69c9c62 make hdb plugin test pass 2014-02-14 19:36:36 -08:00
Jeffrey Altman
c07aaee128 krb5_get_name_canon_rules: fix profile location
[realms] <realm> { name_canon_rules = <strings> }

not

[libdefaults] <realm> { name_canon_rules = <strings> }

Change-Id: I770c2250333d2649f983f015de94f30740c9771d
2014-02-14 22:32:15 -05:00
Love Hörnquist Åstrand
6d57bb6a4a quiet warnings 2014-02-14 19:26:20 -08:00
Love Hörnquist Åstrand
c69c4634ad allow setting signature algorithm 2014-02-12 09:46:02 -08:00
Jeffrey Altman
e37d66486c Merge pull request #59 from chewi/master
Fix roken-h-process.pl
2014-02-11 20:44:59 -08:00
Jeffrey Altman
e52c5f2a64 Windows packaging: install kadmin.exe
Now that kadmin.exe works on Windows, install it.

Change-Id: I4b5e85386bd6e39ac1a8e01cd6d323c09520da1a
2014-02-04 23:20:16 -05:00
Jeffrey Altman
3e2ca4be37 min instead of MIN
The MIN macro is not defined everywhere.  use min().

Change-Id: I47413080364e215ad2a2075403b224867deba037
2014-02-04 23:20:13 -05:00
Jeffrey Altman
8de592ab5a 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
2014-02-04 23:20:11 -05:00
Jeffrey Altman
d9bc256199 define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE
Always define HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE even if attributes are
not supported.

Change-Id: Ibc2110d809d81f546723853038c69176075d6013
2014-02-04 23:20:10 -05:00
Jeffrey Altman
dba026b5ef 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
2014-02-04 23:20:08 -05:00
Nicolas Williams
fdabfd6040 Win32 dladdr() wasn't returning 0 in all failures 2014-02-04 15:43:28 -06:00
Nicolas Williams
2fd4c58338 dladdr() on Win32 should't leave dli_fname == NULL 2014-02-04 15:37:45 -06:00
Nicolas Williams
2820cd7716 Revert "Minor WIN32/POSIX bug in resolve_origin()"
This reverts commit c9985fc695.
2014-02-04 14:37:54 -06:00
Jeffrey Altman
6c4423cd46 kadm5: use rk_closesocket to close sockets
kadm5_c_destroy did not use rk_closesocket when cleaning up
the context.  This results in an exception on Windows since a
socket is not a file descriptor.

Change-Id: I9ebddad61f0199acb495a0773925df4f41e4fef2
2014-02-03 15:40:32 -05:00
James Le Cuirot
97f1e2efb5 Fix roken-h-process.pl 2014-02-01 22:04:10 +00:00
Jeffrey Clark
cc1faff15f Simple hdb plugin test
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2014-01-31 08:49:55 +01:00
Jeffrey Clark
c1c7da7f79 Fix compiling hdb ldap as a module
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2014-01-31 08:49:51 +01:00
Love Hörnquist Åstrand
d8d0e659ce make sure h is set at when we find a match, from [GITHUB #54] 2014-01-31 08:45:29 +01:00
Ingo Schwarze
b7d384392b fix the kswitch(1) manual prologue
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2014-01-31 08:38:04 +01:00
Gustavo Zacarias
f76e8d5710 roken-h-process: use Getopt::Std, getopts.pl is deprecated
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2014-01-31 08:33:39 +01:00
Love Hörnquist Åstrand
1c698d298c Merge pull request #57 from jelmer/gitignore-update
Update .gitignore with generated files.
2014-01-19 16:41:28 -08:00
Jelmer Vernooij
4028bc3b70 Update .gitignore with generated files. 2014-01-20 00:38:54 +00:00
Nico Williams
cf6f9cc613 Merge pull request #56 from jelmer/kcm-fix-sigterm
Fix handling of SIGINT/SIGTERM in kcm.
2014-01-18 23:58:46 -08:00
Jelmer Vernooij
95bc8aca4a Fix handling of SIGINT/SIGTERM in kcm.
Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=654349
2014-01-18 21:33:39 +00:00
Viktor Dukhovni
bb895bdd90 Fix k5login_authoritative
In the previous implementation when .k5login or .k5login.d existed
and k5login_authoritative was false, no further plugins were tried.
Also when k5login_authoritative was true and .k5login did not match,
the directory was never tried.
2014-01-08 21:46:06 -05:00
Luke Howard
788d39b3ce set m->gm_mech.gm_name 2014-01-04 16:31:01 +11:00
Luke Howard
4ff005a6a4 gm_mech_oid must be set
mechanism credentials created by dynamically loaded mechanisms do not work
because the gm_mech_oid field is unset for such mechanisms (instead, only
gm_mech.gm_mech_oid is).
2014-01-04 15:58:10 +11:00
Russ Allbery
22c7f07ed8 Add symbol versioning for libkadm5clnt
In order to support plugins for kadmin that use libkadm5srv, the
libkadm5clnt library has to be versioned to avoid hijacking all
of the function calls that should go to the server library.  Omit
the _kadm5_ clients from the public interface, and version
everything else.

Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2013-12-23 13:20:26 +01:00
Love Hörnquist Åstrand
27c3ada0f6 Merge pull request #53 from jelmer/kadm-pc
Also add heimdal-kadm-{server,client} pc files that are co-installable with MIT.
2013-12-22 12:11:22 -08:00
Nicolas Williams
c9985fc695 Minor WIN32/POSIX bug in resolve_origin() 2013-12-13 13:28:51 -06:00
Arran Cudbard-Bell
f604e424d1 Issue #491: bus error in resolve_origin()
resolve_origin attempts to insert '\0' into a field from a DL_info
struct, causes BUS error.

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
2013-12-13 13:27:57 -06:00
Nicolas Williams
38a92f759d Add kx509 parameters to verify_krb5_conf.c 2013-12-10 00:47:11 -06:00
Jelmer Vernooij
6076a828d4 Add heimdal-kadm-{client,server} with kadm-{client,server} depending on
them.
2013-12-07 20:43:04 +00:00
Nicolas Williams
318f89d602 Document kx509 parameters 2013-12-05 16:00:21 -06:00
Nicolas Williams
2c265a8182 Add option to require initial kca_service tickets
Default to TRUE, and allow setting it on a per-realm basis.
2013-12-05 16:00:21 -06:00
Nicolas Williams
5807540e1b Fix kx509 to include realm 2013-12-05 16:00:21 -06:00
Love Hörnquist Åstrand
d069763ac1 add --policy documentation 2013-12-04 11:31:29 -08:00
Jeffrey Altman
ad995f9b69 kx509: Prevent double free
Patchset 750a09bca2 introduced the
potential for a double free of 'name'.

Change-Id: I23bd4ddb7d9b41cbb3948ab06245f4052b309971
2013-12-04 14:21:56 -05:00
Love Hörnquist Åstrand
b20e7fa4d0 use heimdal-krb5 instead of krb5 as dependency 2013-12-04 11:16:15 -08:00
Love Hörnquist Åstrand
ef8119a8cc spelling 2013-12-04 11:15:30 -08:00
Love Hörnquist Åstrand
66769e8299 Merge pull request #46 from jelmer/krb5-pc
Add heimdal-krb5.pc file, with krb5.pc depending on it.
2013-12-04 11:09:34 -08:00
Love Hörnquist Åstrand
9e86558ed4 Merge pull request #50 from MrStaticVoid/kx509-allow-slash-in-principal-name
kx509: Create certs for principals with slashes
2013-12-04 11:08:00 -08:00
James Lee
750a09bca2 kx509: Create certs for principals with slashes
kx509 fails to create certs for principals with slashes in them.  For
example:

    client% kinit foo/admin
    foo/admin@EXAMPLE.COM's Password:
    client% kx509
    Timed out waiting on KCA

The KCA reports: "Principal is not a user."  However, there is a use
case set out in this post:

https://thestaticvoid.com/post/2012/10/25/protecting-puppet-with-kerberos/

that would create a kx509 cert for a host principal for authenticating
against a secure HTTP service.  This commit modifies the certificate
creation code to allow principals with slashes in them.
2013-12-04 13:49:38 -05:00
Love Hörnquist Åstrand
6b2ebfcf8a Merge pull request #48 from pettai/master
Allow validation of kdigest stuff
2013-11-28 14:33:03 -08:00
Fredrik Pettai
418fdb7f79 Also validate kdigest hacks
Add validation of the kdigest configuration parameters
2013-11-28 14:14:11 +01:00
Nicolas Williams
b20bb509bd Fix never valid error condition in KDC
The TGS was incorrectly using authtime to compute renew_till for new
tickets, which was in turn leading to endtime potentially being equal to
starttime, which caused the TGS to return KRB5KDC_ERR_NEVER_VALID.

This happens when the TGT renewal lifetime is longer than the max renew
lifetime of any other services, after that much time (target services'
max renew life) passes.  The TGT is still good but TGS-REQs fail.
2013-11-26 16:57:19 -06:00