Commit Graph

28406 Commits

Author SHA1 Message Date
Nicolas Williams
cf4efe8de6 Add secure_getenv.c 2017-04-17 18:02:30 -04:00
Nicolas Williams
90110f5553 Revamp issuid() 2017-04-17 18:02:30 -04:00
Nicolas Williams
650ffdc964 Revamp lib/roken/getauxval.c 2017-04-17 18:02:30 -04:00
Viktor Dukhovni
c7f54ae85a Fix error in last-minute tgt referral tweak 2017-04-14 15:26:26 -04:00
Viktor Dukhovni
1c6e1d5b1a Improve referral processing for TGTs
When using referrals to obtain krbtgt/A@B we're really looking for a
path to krbtgt/B first, and only then a ticket for krbtgt/A.
2017-04-13 18:11:52 -05:00
Viktor Dukhovni
a4fb8984dd Do not ignore realm when checking for expected ticket or referral 2017-04-13 18:11:52 -05:00
Viktor Dukhovni
10f3ab0f2a Never store TGT "aliases"
When obtaining a remote TGT krbtgt/REALM2@REALM2, an intermediate
cross-realm TGT obtained for krbtgt/REALM2@REALM1 is not equivalent
to the TGT we seek, and must not be stored under its name.
2017-04-13 18:11:52 -05:00
Viktor Dukhovni
f468c2fed1 Use actual Ticket to construct AP-REQ
When the cred passed krb5_build_ap_req() has a different name for the actual
ticket (e.g., because the entry came from a ccache with an alias name as the
entry name) then we were putting a Ticket on the wire with the name from the
cred rather than from the Ticket in the cred.  We don't think this is intended
or desirable.  The server should see the Ticket _exactly_ as minted by the KDC.

Perhaps AP-REQ should have used an OCTET STRING to contain the Ticket given that
Ticket is a PDU, which would make a byte-for-byte copy trivial, but as it is it
uses Ticket instead.  Therefore this commit has it decode the Ticket from the
cred and then C struct assign that value to the AP-REP's ticket field -- this
then copies the Ticket as exactly as vended.
2017-04-13 18:11:52 -05:00
Viktor Dukhovni
b1e699103f Fix transit path validation CVE-2017-6594
Commit f469fc6 (2010-10-02) inadvertently caused the previous hop realm
to not be added to the transit path of issued tickets.  This may, in
some cases, enable bypass of capath policy in Heimdal versions 1.5
through 7.2.

Note, this may break sites that rely on the bug.  With the bug some
incomplete [capaths] worked, that should not have.  These may now break
authentication in some cross-realm configurations.
2017-04-13 18:06:39 -05:00
Viktor Dukhovni
d5dd5aab19 Update NEWS for Heimdal 7.2 2017-04-13 18:06:35 -05:00
Nicolas Williams
f867a12aa9 Test rk_get*auxval() 2017-03-31 18:56:04 -05:00
Nicolas Williams
707b2372d2 Further improvements to issuid() 2017-03-31 18:56:04 -05:00
Viktor Dukhovni
26a0332e3c Update SQLite to 3.17.0 2017-03-19 18:55:51 -04:00
Jeffrey Altman
23ee804e9d lib/krb5: krb5_config_parse_file_multi use after free
If the file is not a regular file, the 'fname' buffer will be freed
before it is passed to the krb5_set_error_message() routine.  That
this is true is not obvious from code inspection but 'newfname'
and 'fname' refer to the same memory.

Change-Id: I7780eae9ceaf01b245df488a2f7d7f406770864f
2017-03-18 15:22:33 -04:00
Nicolas Williams
d8a112ae1a Fix lib/hdb make race 2017-03-17 13:20:06 -05:00
Viktor Dukhovni
7c18507ccd Avoid make dist fail when doxyout/ does not exist 2017-03-17 12:47:39 -04:00
Viktor Dukhovni
aad3b229ae Fix off by 1 write. 2017-03-17 11:51:30 -04:00
Viktor Dukhovni
6b285e67e5 Avoid expr in non-portable comparison
The output of `wc -l` includes leading white-space, and at least
in FreeBSD 11, `expr 1 + "$foo"` fails when "$foo" (captured as
`wc -l` output) has leading whitespace.  Instead, just emit one
more line for "wc" to count.
2017-03-16 11:41:19 -04:00
Viktor Dukhovni
14135e90aa Add rationale comments for conditional yyparse redefinition 2017-03-15 19:15:57 -04:00
Viktor Dukhovni
008a26c489 Leave srcdir as-as and use absolute form only as needed 2017-03-15 19:12:03 -04:00
Jeffrey Altman
ebae52f3cc kdc: de_http stricter parsing
In de_http() treat any sequence of '%' not followed by two hex digits
as invalid.

Change-Id: I812665c1a2806f8daba06d267bbee57287aa2314
2017-03-13 19:17:29 -04:00
Nicolas Williams
097e96cbf4 Look for emalloc
Originally by Christos Zoulas.
2017-03-13 18:39:41 -04:00
Nicolas Williams
3cec979cc4 Don't #define yyparse when using bison/flex
Originally by Christos Zoulas.
2017-03-13 18:39:41 -04:00
Nicolas Williams
352ff15477 Use labs(rand()) instead of abs(rand()) in tommath
Originally by Christos Zoulas.
2017-03-13 18:39:41 -04:00
Nicolas Williams
369945f5bc kadm5 ad backend wrong size memset
Originally by Christos Zoulas.
2017-03-13 18:39:41 -04:00
Nicolas Williams
936017e4d6 KCM wrong size memcmp
Originally by Christos Zoulas.
2017-03-13 18:39:41 -04:00
Nicolas Williams
c9e5da9d2b NTLM memleak
Originally by Christos Zoulas.
2017-03-13 18:39:41 -04:00
Nicolas Williams
9609397874 Misc 64-bit time support (debug message)
Originally by Christos Zoulas.  Originally used %jd and casts to
intmax_t, however, we can't use those on Windows yet.
2017-03-13 18:39:41 -04:00
Nicolas Williams
4c64231430 Misc last newline fixes
Originally by Christos Zoulas.
2017-03-13 18:39:41 -04:00
Nicolas Williams
8e5e8aacbc Misc fixes to man pages
Originally by Christos Zoulas.
2017-03-13 18:39:41 -04:00
Nicolas Williams
6a0f45c4d7 Use __attribute__ ((__name__)) form
Protect against macros named noreturn and so on.
2017-03-13 18:39:41 -04:00
Viktor Dukhovni
31896397d7 In krb5-config resolve rpath_flag at build-time 2017-03-10 19:23:31 -05:00
Nicolas Williams
0259f1c449 Fix CR comments on include/includedir 2017-03-10 17:33:12 -05:00
Nicolas Williams
96641e12ba Canonicalize $srcdir in configure.ac
For krb5.conf include/includedir we want to reject non-absolute paths,
but then we need to make sure that we use absolute paths in the tests,
otherwise they fail.  Of course ./configure has been defaulting to
relative paths for $srcdir and $objdir.  This commit canonicalizes
$srcdir; eventually, no doubt, we'll have to canonicalize $objdir too.
2017-03-10 17:33:12 -05:00
Quanah Gibson-Mount
7c16ce3457 Minor typo/grammar fixes 2017-03-10 15:47:43 -05:00
Viktor Dukhovni
28b6b96e09 Don't do AFS string-to-key tests when feature is disabled 2017-03-09 20:26:30 -05:00
Viktor Dukhovni
2baa0a00c8 Skip mdb_stat test when the command is not available 2017-03-09 20:20:25 -05:00
Roland C. Dowdeswell
a39bd42576 Remove #if 0'd code.
This is a slightly different fix than that proposed in Pull Request #151.
2017-03-09 14:12:39 -05:00
David Mulder
3f36b4ad68 On hpux, pthread_cond_t is undefined when pthread is disabled 2017-03-09 14:11:19 -05:00
Chris Leick
3a774de985 German translation 2017-03-09 13:41:49 -05:00
Nicolas Williams
fe43be8558 Add include/includedir directives for krb5.conf 2017-02-27 18:15:59 -06:00
Jeffrey Altman
3a0d9f07a8 Windows: update SHA2 timestamp server
The RFC 3161 Service SHA128: https://timestamp.geotrust.com/tsa
is being decommissioned at the end of March 2017.  A new SHA256 service:
http://sha256timestamp.ws.symantec.com/sha256/timestamp
takes its place.

Change-Id: Iaf3de7ce7ccdd5c2589e80a7e4accccb307228d3
2017-02-23 21:28:03 -05:00
Jeffrey Altman
5360a6dee6 hdb: export hdb_generate_key_set_password_with_ks_tuple
Must export hdb_generate_key_set_password_with_ks_tuple() on Windows
which was introduced in 4303174a49.

Change-Id: Iea2993a17aba44c7cb0360716138c26239254e05
2017-02-16 13:14:50 -05:00
Chris Leick
dc7a46188a German translation of heim_com_err569856 2017-01-31 19:15:58 -05:00
Chris Leick
21c4d38487 German translation of 2 error files 2017-01-31 19:15:58 -05:00
Chris Leick
f1da69a80b German translation 2017-01-31 19:15:58 -05:00
Roland C. Dowdeswell
4303174a49 Fix signature of hdb_generate_key_set_password()
The change to the signature of hdb_generate_key_set_password() in
Heimdal 7.1 broke API/ABI compatibility with previous releases.  We
fix this by renaming it hdb_generate_key_set_password_with_ks_tuple()
and creating a new hdb_generate_key_set_password() which calls our
new function with zeroes for the added arguments.

Issue #246      https://github.com/heimdal/heimdal/issues/246
2017-01-29 19:40:59 -05:00
Jeffrey Altman
ae432b0264 Windows: include KX509 support
Change-Id: I6e7920d1ad2c58640c9a2d4ec10793024ae949c2
2017-01-27 00:37:08 -05:00
Jeffrey Altman
ec39b832ff kdc: fix kx509 service principal match
Each KDC is a kx509 server.  The service principal must be of the
form

  kca_service/<localhost.domain>@<DEFAULT_REALM>

where localhost.domain is the hostname returned by gethostname()
and <DEFAULT_REALM> is one of the realms for which the KDC has a service
principal "kca_service/<localhost.domain>".

The matching code was broken by a5e77c578e
when krb5_sname_to_principal() began to always return a referral
principal.

Since the second component is a host name update the default principal
type for service "kca_service" to be KRB5_NT_SRV_HST.

Change-Id: I6bd5f90b674ebb7220d8efafa6d339fdc21e1a07
2017-01-27 00:37:08 -05:00
Nicolas Williams
656e4c4f42 iprop: handle case where master sends nothing new 2017-01-25 18:50:03 -06:00