Commit Graph

16088 Commits

Author SHA1 Message Date
Love Hörnquist Åstrand
d1cee9a14b now that use used up more then 16 flags and we have been using the right bit order for many years, lets stop dealing with broken bit fields from ticket flags 2014-08-23 18:48:34 -07:00
Love Hörnquist Åstrand
c10e99bead Merge pull request #109 from cg2v/dist-kadmin-version-script
version-script-client.map needs to be in dist
2014-08-22 21:38:55 -07:00
Love Hörnquist Åstrand
4569c07522 Merge pull request #110 from cg2v/anonymous-pkinit
Anonymous pkinit improvements
2014-08-22 21:35:22 -07:00
Love Hörnquist Åstrand
30768c75bb make quiet 2014-08-22 21:25:01 -07:00
Love Hörnquist Åstrand
95f86ad1b8 remove stray a 2014-08-22 21:23:30 -07:00
Love Hörnquist Åstrand
37afa01be3 rename roken base64, fixes #107 2014-08-22 20:57:24 -07:00
Love Hörnquist Åstrand
ad9cd6a138 Merge pull request #112 from jhutz/rxkad-kdf
libkafs: derivation from non-DES key (rxkad-kdf)
2014-08-22 20:21:37 -07:00
Love Hörnquist Åstrand
a84b572747 resurrect password change support again 2014-08-22 20:19:36 -07:00
Jeffrey Hutzelman
9d511ea37d libkafs: derivation from non-DES key (rxkad-kdf)
Add support for the "rxkad-kdf" protocol for deriving rxkad session keys
from non-DES Kerberos session keys.  This allows rxkad to be used in
realms where the KDC is unwilling or unable to issue tickets with
single-DES session keys.
2014-08-21 13:05:59 -04:00
Love Hörnquist Åstrand
c93db5aa52 check for sys/errno.h 2014-07-18 17:46:25 +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
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
63e2f30fd5 Move kadmin and ktutil to /usr/bin. 2014-06-09 23:36:23 +02: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
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
Jelmer Vernooij
4199081e94 Various manpages: Remove references to Kerberos 4. 2014-04-28 01:03:10 +02: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
Jelmer Vernooij
c5e8e049cb Fix some typos. 2014-04-23 03:05:23 +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
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
Volker Lendecke
56bcd356d8 heimdal: Fix CID 240779 Allocation size mismatch
(rebased on current Heimdal by abartlet)

The error Coverity complains about is in the malloc. krb5_enctypes is
an enum, so it is usually smaller than the size of a pointer. So we
overallocate, but in the memcpy further down we copy from potentially
invalid memory.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 13 11:05:44 CET 2013 on sn-devel-104
2014-03-24 23:07:51 -05:00
Volker Lendecke
2aca5c4fae heimdal: Fix CID 241943 Uninitialized pointer read
In the error case without EXTRA_ADDRESSES we access ignore_addresses
without initialization

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-03-24 23:07:51 -05:00
Volker Lendecke
b408e93ae3 heimdal: Fix 241482 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2014-03-24 23:07:50 -05:00
Stefan Metzmacher
1ae5df045e heimdal:lib/wind: include <stdlib.h> at the end
This makes sure config.h gets includes first.

This should fix the build on AIX.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Jun 17 16:16:24 CEST 2012 on sn-devel-104
2014-03-24 23:07:50 -05:00
Stefan Metzmacher
2596cfe324 heimdal:lib/wind: make sure errorlist_table.c includes config.h as first header
This should fix the build on AIX.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Jun 16 23:59:07 CEST 2012 on sn-devel-104
2014-03-24 23:07:50 -05:00
Stefan Metzmacher
506780a160 heimdal:lib/krb5: don't name a struct 'token'
This is a static const struct and the name is never used,
so just make it an anonymous struct.

This hopefully fixes the build on AIX:

"../lib/roken/roken-common.h", line 276.9: 1506-236 (W) Macro name __attribute__ has been redefined.
"../lib/roken/roken-common.h", line 276.9: 1506-358 (I) "__attribute__" is defined on line 45 of ../lib/com_err/com_err.h.
"../lib/krb5/expand_path.c", line 331.21: 1506-334 (S) Identifier token has already been defined on line 98 of "/usr/include/net/if_arp.h".
"../lib/krb5/expand_path.c", line 390.43: 1506-019 (S) Expecting an array or a pointer to object type.
"../lib/krb5/expand_path.c", line 391.31: 1506-019 (S) Expecting an array or a pointer to object type.
"../lib/krb5/expand_path.c", line 392.20: 1506-019 (S) Expecting an array or a pointer to object type.
"../lib/krb5/expand_path.c", line 392.48: 1506-019 (S) Expecting an array or a pointer to object type.
"../lib/krb5/expand_path.c", line 393.39: 1506-019 (S) Expecting an array or a pointer to object type.
Waf: Leaving directory `/opt/home/build/build_farm/samba_4_0_test/bin'
Build failed:  -> task failed (err #1):
	{task: cc expand_path.c -> expand_path_52.o}
gmake: *** [all] Error 1

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Jun 16 15:20:59 CEST 2012 on sn-devel-104
2014-03-24 23:07:49 -05:00
Volker Lendecke
c281ad6ccb heimdal: Fix the build on FreeBSD
We don't have BACKTRACE_SYMBOLS by default
2014-03-24 23:07:49 -05:00
Andreas Schneider
cfc398d32e s4-heimdal: Remove the execute flag of cfx.c.
The scripts which are extracting debuginfo are looking for files with
the executable bit and find cfx.c which isn't a executable.
2014-03-24 23:07:49 -05:00
Jelmer Vernooij
cc495fd78d Avoid breaking symbol names for all previously present functions.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Nicolas Williams <nico@cryptonector.com>
2014-03-24 22:45:13 -05:00
Love Hörnquist Åstrand
8a4cf0dd12 don't see anything since /dev/random doesn't really need more seeding
redhat have Linux SE rules that slows down openssh when heimdal tries
to write, so lets not write.

https://bugzilla.redhat.com/show_bug.cgi?id=1076979
2014-03-20 22:35:51 +01:00
Benjamin Kaduk
ad57868996 Fix KRB-FX-CF2 for enctypes with non-dense keyspaces
It is necessary to use the RFC3961 random_to_key operation when
creating a key from a bitstring.

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
2014-03-16 22:57:13 -05:00
Greg Hudson
cdf39f1369 Fix DES3 PRF
RFC 3961 says the simplified profile PRF should truncate the hash
output to "multiple of m", which MIT krb5 interprets as the largest
possible multiple of m.  RFC 6113 appendix A also uses that
interpretation for the KRB-FX-CF2 test vector.  So the DES3 PRF should
truncate the 20-byte SHA-1 result to 16 bytes, not 8.  Also make
krb5_crypto_prf_length work with DES3 by giving the DES3 enctype a
non-zero PRF length.

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
2014-03-16 22:56:48 -05:00
Nicolas Williams
9269a4428a Add missing KRB-FX-CF2 test vectors (3DES broken)
Note that this shows that the our KRB-FX-CF2 is broken as to 3DES (and
the 1DES PRF is still missing).
2014-03-16 02:19:35 -05:00
Viktor Dukhovni
ae2df333cd More complete logging of capths violations
It is much easier (i.e. actually possible) to debug transit path policy
violations when the logs specify the client and server realms, not just
the transit realm.
2014-03-15 00:04:20 -04:00
Nicolas Williams
c9f65fc942 env KRB5CCNAME=/tmp/foocc kinit ignores the env
The problem is that fcc_get_cache_next() is called in a context where
context->default_cc_name is not set.  We should call
krb5_cc_default_name(), and that fixes the problem.  There's a comment
warning that this can result in reentering krb5_cc_cache_match(), but
nothing in libkrb5 calls krb5_cc_cache_match(), so the comment is wrong,
at least in the github tree.

An alternative would be to call krb5_cc_set_default_name(NULL) in
kuser/kinit.c before calling krb5_cc_cache_match(), however, that seems
like an insufficiently general solution.  Also, the semantics of
krb5_cc_cache_match() would differ from MIT's -- it seems better to
match MIT's semantics.
2014-03-13 00:38:48 -05:00
Viktor Dukhovni
46e0bd3c68 Use P-256 for EC tests
Fedora/RedHat OpenSSL supports only P-256, P-384 and P-521.

The new mkcert.sh script can create updated certs when these
expire on Jan 17th 2038.
2014-03-12 21:18:03 -04:00
Jeffrey Altman
6bfcd13506 Windows: add usleep() to roken
Add a version of usleep() which is capable of sleeping in one
millisecond increments instead of microseconds.

Change-Id: I173f7e6f91a947cdb66f7cc6df5520e1c03f10b7
2014-02-23 23:24:48 -05:00
Love Hörnquist Åstrand
1a616b0faf update copyright year 2014-02-18 08:34:32 -08:00
Ken Dreyer
d0b70a463c roken: don't ignore HAVE_OPENPTY on linux
openpty() is not available on all Linux distributions. Trust autoconf's
determination for HAVE_OPENPTY instead of unconditionally using
openpty() on all Linux.
2014-02-17 14:40:33 -07:00
Love Hörnquist Åstrand
514d4d3ef4 remove extra _ 2014-02-16 21:50:03 -08:00
Jeffrey Altman
f3d9d4119e export hx509_ca_tbs_set_signature_algorithm
hx509_ca_tbs_set_signature_algorithm was added by commit
c69c4634ad.  It must be exported
for use by hxtool on Windows.

Change-Id: I14b927abde96814ae2e0a90f232ab00915a9f29e
2014-02-16 21:01:57 -05:00
Love Hörnquist Åstrand
dbf523a15d clean files 2014-02-16 11:52:22 -08:00