Commit Graph

27700 Commits

Author SHA1 Message Date
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
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
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
Andrew Tridgell
6f0cafa6cf heimdal: handle referrals for 3 part DRSUAPI SPNs
This handles referrals for SPNs of the form
E3514235-4B06-11D1-AB04-00C04FC2DCD2/NTDSGUID/REALM, which are
used during DRS replication when we don't know the dnsHostName of the
target DC (which we don't know until the first replication from that
DC completes).

We use the 3rd part of the SPN directly as the realm name in the
referral.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
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