Commit Graph

27968 Commits

Author SHA1 Message Date
Samuel Cabrero
f79326e960 Check _kdc_db_fetch return value before dereference entry pointer
This fixes a segfault if the _kdc_db_fetch function does not find
the entry in the database (the entry pointer will be NULL if entry
is not found).

Signed-off-by: Samuel Cabrero <scabrero@zentyal.com>
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2014-07-18 17:46:25 +02:00
Love Hörnquist Åstrand
c93db5aa52 check for sys/errno.h 2014-07-18 17:46:25 +02:00
Jelmer Vernooij
445160aa2c Add travis config. 2014-07-15 23:19:58 +02:00
Chaskiel Grundman
41da16b48a version-script-client.map needs to be in dist
version-script-client.map needs to be in lib/kadm5's EXTRA_DIST,
otherwise make distcheck fails
2014-07-07 12:39:49 -04:00
Chaskiel Grundman
f07ee07288 Use anon realm for anonymous PKINIT
When an AS request names the anonymous principal, use the anonymous
realm in the response and ticket.
2014-07-07 12:35:43 -04:00
Love Hörnquist Åstrand
217ae4315a Merge pull request #108 from ktdreyer/kadm5-make-race
kadm5: fix race in Makefile with kadm5_err.h
2014-07-06 23:03:55 +02:00
Chaskiel Grundman
f3789f8cc5 Document logic in _krb5_is_anon_request
describe why we look at the different bits and fields
2014-07-06 14:37:49 -04:00
Chaskiel Grundman
c2e2de7384 When using PKINIT with DH, compute session key
RFC6112 provides a method of computing a session key when the PKINIT DH
is used, and mandates it for anonymous pkinit. The session key is computed
using KRB-FX-CF2 from the reply key and a random key chosen by the kdc.
The random key is provided to the client, which is supposed to verify
that the session key was computed this way.
2014-07-03 12:24:08 -04:00
Chaskiel Grundman
bf7f31ee09 Include empty PKINIT-KX padata
rfc6112 requires kdcs implementing anonymous PKINIT to include an
empty PKINIT-KX padata in PREAUTH_REQUIRED messages.
Including this improves compatibility with MIT kerberos.
2014-07-03 12:24:08 -04:00
Chaskiel Grundman
5f2a93f5ca Recognize anonymous AS requests using bit 14
Check KDC Option bit 14 in addition to 16 when identifying anonymous
AS-REQs. This provides compatibility with older heimdal releases.
2014-07-03 12:24:08 -04:00
Chaskiel Grundman
86554f5a7f Use correct value for anonymous flags
The KDC Option and Ticket Flag for the anonymous extension were changed
from 14 to 16 due to a conflict with S4U2Proxy in version 11 of the anonymous
draft (now RFC6112). Fix the definitions
2014-07-02 20:24:49 -04:00
Jakub Čajka
6affa4ccec kadm5: fix race in Makefile with kadm5_err.h
When running make with -j4, occasionally kadm5 fails due to a missing
header file kadm5_err.h. Fix the race condition.

Reported at https://bugzilla.redhat.com/1115164

Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
2014-07-01 13:18:09 -06:00
Jeffrey Altman
a5da5bcb96 asn1: check overflow against SIZE_MAX not +1
A comparison of (len > len + 1) is permitted to be optimized out
as dead code because it can't be true.  Overflowing is an exceptional
condition that results in undefined behavior.  The correct conditional
is (len == SIZE_MAX) when len is size_t.

Change-Id: Ia5586556a973d9fa5228430c4304ea9792c996bb
2014-06-20 20:15:13 -04:00
Jelmer Vernooij
31be932fe8 Install compatibility symlinks for kadmin and ktutil. 2014-06-11 03:44:28 +02:00
Love Hörnquist Åstrand
5fd158db47 Merge pull request #104 from jelmer/kadmin-ktutil-to-usr-bin
Move kadmin and ktutil to /usr/bin.
2014-06-10 14:29:37 -07:00
Jelmer Vernooij
63e2f30fd5 Move kadmin and ktutil to /usr/bin. 2014-06-09 23:36:23 +02:00
Jeffrey Altman
9ef790576d Merge pull request #102 from jelmer/manpages-no-krb4
Remove references to Kerberos 4 from manpages.
2014-06-01 19:59:35 -04:00
Jelmer Vernooij
ea062e4bb2 Remove references to KRBTKFILE from login.1 and kinit.1. 2014-06-02 00:32:37 +02:00
Jelmer Vernooij
5a75d6fe43 afslog.1: Remove documentation for removed no-v4 argument. 2014-06-02 00:32:37 +02:00
Jeffrey Altman
0b56c1ebab Merge pull request #101 from jelmer/kimpersonate-no-kerb4
Remove kerberos 4 references from kimpersonate.8.
2014-06-01 17:35:48 -04:00
Jelmer Vernooij
7e81485562 Remove kerberos 4 references from kimpersonate.8. 2014-06-01 23:21:52 +02:00
Ken Dreyer
11c9e28192 kadmin: handle systemd setpgid failure
When running as a service under systemd, kadmin cannot successfully use
setpgid().  The call fails with EPERM. Do not treat this as a fatal
error; instead, allow kadmind to continue starting up.
2014-05-31 02:03:38 -06:00
Love Hörnquist Åstrand
684ff198b7 Merge pull request #99 from ktdreyer/klist-spelling-comments
klist: fix spelling in comments
2014-05-28 23:40:24 +02:00
Ken Dreyer
9dd7e27bf7 klist: fix spelling in comments 2014-05-28 14:34:06 -06:00
Jeffrey Altman
732bfd11be roken: Windows ELOOP definition
Microsoft VC 2010 defines ELOOP as 114

Change-Id: Iba6cfd83e4a9ea1d43ed8aff7893d557648fc7e5
2014-05-14 21:56:51 -04:00
Jeffrey Altman
69c2872dbd kinit: get_switched_ccache
Provide a new internal function called get_switched() to encapsulate
the algorithm for selecting a credential cache when the selected
ccache type supports switching.  There is no change in behavior for
UNIX which always calls krb5_cc_new_unique().  However, on Windows
alternate behavior is provided when the ccache type is API or MSLSA.

For the API ccache the default ccache name is stored in the Windows
registry which is shared across all logon sessions belonging to a
user.  For users that are members of the Administrators group this
includes both the UAC restricted and elevated sessions sharing the
same desktop.  It is very disconcerting when the elevated session obtains
credentials for the same client principal as the restricted session
and then all apps in the restricted session lose access to their
credential cache.   For Windows, the API credential caches are named
after the principal that is stored within them.  It provides for a
better end user experience.

For the MSLSA ccache tickets belonging to multiple principals are
all stored within the MSLSA ccache.  As a result, all attempts to
switch ccache names default back to the one and only one name.

Change-Id: I7865cd044cff01ff38ab107ec0961e42788fa073
2014-05-14 21:52:35 -04:00
Jeffrey Altman
f5b10e53a0 Merge pull request #94 from jelmer/ignore-test-output
Update .gitignore to ignore all test binaries and output.
2014-05-10 09:30:04 -04:00
Jelmer Vernooij
88447a543a Update .gitignore to ignore all test binaries and output. 2014-05-10 15:03:57 +02:00
Nicolas Williams
816e8fcfa9 Use thread-safe errno on Solaris 2014-05-05 00:00:46 -05:00
Love Hörnquist Åstrand
8a91925242 Merge pull request #91 from ktdreyer/test-fx-weak-crypto
test_fx: enable weak crypto
2014-04-30 21:33:13 -07:00
Ken Dreyer
142a3cee1e test_fx: enable weak crypto
Now that test_fx checks 1DES keys, we need to call allow_weak_crypto on
the test's context.

Without this fix, "make check" was failing with the following error:

  lt-test_fx: krb5_crypto_init: Encryption type des-cbc-crc not
  supported
2014-04-29 11:04:21 -06:00
Jeffrey Altman
5907fd34d8 Merge pull request #88 from jelmer/rm-krb4-references
Remove rereferences to Kerberos 4.
2014-04-27 22:00:10 -04:00
Jelmer Vernooij
4199081e94 Various manpages: Remove references to Kerberos 4. 2014-04-28 01:03:10 +02:00
Jelmer Vernooij
341f032cfd kdc.8: Remove references to kerberos 4. 2014-04-28 01:02:45 +02:00
Jelmer Vernooij
cfc34e25a6 Remove use of krb4 settings in example krb5.conf. 2014-04-28 00:56:18 +02:00
Love Hörnquist Åstrand
dae2c2c658 Merge pull request #85 from jelmer/fix-typos
Fix some typos.
2014-04-24 17:47:44 -07:00
Jelmer Vernooij
70e43e9808 Fix some typos. 2014-04-25 02:42:17 +02:00
Love Hörnquist Åstrand
80a514219f Merge pull request #80 from ktdreyer/ldap-declaration
build failure with Fedora regarding hdb_ldap_create and hdb_ldapi_create
2014-04-24 08:49:00 -07:00
Love Hörnquist Åstrand
f55741f16d Merge pull request #83 from jelmer/pc-limit-libs
Limit the libraries pulled in when dynamic linking.
2014-04-24 08:38:50 -07:00
Love Hörnquist Åstrand
622363a01f Merge pull request #84 from jelmer/fix-typos
Fix some typos in hx509_err.et.
2014-04-24 08:36:25 -07:00
Jelmer Vernooij
c5e8e049cb Fix some typos. 2014-04-23 03:05:23 +02:00
Jelmer Vernooij
a6bda7873c Limit the libraries pulled in when dynamic linking.
See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745543
2014-04-23 02:49:53 +02:00
Ken Dreyer
10519ce50d remove hdb ldap create declarations
The hdb_ldap_create and hdb_ldapi_create prototypes use the "static"
keyword, but the functions themselves are not implemented as static.

Heimdal's buildsystem dynamically adds function declarations to
hdb-protos.h based on the actual function implementations. Those
declarations in hdb-protos.h are not declared as static.

Since the build system generates the declarations dynamically, just
remove them from hdb-ldap.c.
2014-03-27 12:11:29 -06:00
Nicolas Williams
f7d76c2b66 Document that ext_keytab can change a princ's keys 2014-03-25 21:57:54 -05:00
Nicolas Williams
b80b21c8a8 Make kadmin ext work when lacking get-keys priv
When we added the get-keys privilege we lost the ability to setup
keytabs with the kadmin ext command.  The fix is to note that we got
bogus key data and randkey (as we used to).
2014-03-25 21:45:10 -05:00
Andrew Bartlett
1fad1f8984 lib/base: Rename strbuf to heim_strbuf to avoid conflict with stropts.h on linux 2014-03-24 23:07:52 -05:00
Andrew Bartlett
9f392c134f heimdal: rename send and recv pointers to avoid conflict with socket wrapper 2014-03-24 23:07:52 -05:00
Andrew Bartlett
2622b32468 lib/base: Add define for HEIMDAL_TEXTDOMAIN 2014-03-24 23:07:52 -05:00
Andrew Bartlett
ccc4302a18 lib/asn1: Add extern to declaration of fuzzer string in gen_locl.h 2014-03-24 23:07:51 -05:00
Volker Lendecke
ba26fa5502 heimdal: Fix a format error on FreeBSD10
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-24 23:07:51 -05:00