Commit Graph

28617 Commits

Author SHA1 Message Date
Luke Howard
070d0cf928 krb5: krb5_get_init_creds_opt_set_change_password_prompt incomplete (#322)
krb5_get_init_creds_opt_set_change_password_prompt() was being ignored by
krb5_init_creds_step() which broke pam_krb5 tests. MIT doesn't handle password
expiration within krb5_init_creds_step(), instead deferring to higher level
functions such as krb5_get_init_creds_password(). However, Heimdal kinit uses
krb5_init_creds_step() directly and thus requires this behaviour to be
implemented to pass its own tests.
2018-12-23 16:59:25 +11:00
Luke Howard
3c92747f2a gss: fix leak in add_builtin() if interning OID fails
4a93c477 (#447) introduced a leak in add_builtin().  Reported by
jaltman@auristor.com.
2018-12-23 15:34:27 +11:00
Luke Howard
6d7b0bfd17 krb5: support default_ccache_name for MIT compat
Allow default_ccache_name as an alias for default_cc_name in krb5.conf, for MIT
compatibility (#355)
2018-12-22 16:37:47 +11:00
Luke Howard
862133e2da krb5: support %{username} path expansion token 2018-12-22 16:31:19 +11:00
Luke Howard
dd7eb8f665 roken: add rk_getpwuid_r()
TODO: implement non-POSIX getpwnam_r()/getpwuid_r() wrappers
2018-12-22 16:30:34 +11:00
Luke Howard
a6ce554c7a krb5: support %{euid} path expansion token 2018-12-22 16:04:32 +11:00
Luke Howard
9d98ce72ff krb5: fix const warning in krb5_c_verify_checksum() 2018-12-21 15:47:20 +11:00
Luke Howard
e11abf414c hdb: support "hard" alias path in AS-REQ (#452)
Adds support for "hard" aliases when initially authenticating, that is,
allowing a client or server principal to be known by many names without
requiring that the client support name canonicalization.

In order to avoid changing the behavior for other backends such as Samba, this
is implemented in the HDB backend rather than the KDC.

To use, add an alias for both the client and TGS ("krbtgt") principals using
kadmin. This behavior is unchanged if name canonicalization is enabled.
2018-12-20 17:59:18 +11:00
Luke Howard
176fe6c06c hdb: fix uninitialized variable use in MIT bridge 2018-12-20 16:25:51 +11:00
Andreas Schneider
122226c3f3 heimdal: Fix size types and array access
This fixes compilation with -Wstrict-overflow=2.

with CFLAGS="-O3 -Werror=strict-overflow -Wstrict-overflow=2"
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) gives:

addr_families.c: In function ‘krb5_sockaddr2address’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:851:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_sockaddr2address (krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_sockaddr2port’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:879:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_sockaddr2port (krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_addr2sockaddr’:
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:914:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_addr2sockaddr (krb5_context context,
 ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_max_sockaddr_size’:
addr_families.c:955:2: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
  for(a = at; a < at + num_addrs; ++a)
  ^
addr_families.c:950:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_max_sockaddr_size (void)
 ^
addr_families.c:955:2: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
  for(a = at; a < at + num_addrs; ++a)
  ^
addr_families.c:955:2: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c:955:2: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_sockaddr_uninteresting’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:974:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_sockaddr_uninteresting(const struct sockaddr *sa)
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_sockaddr_is_loopback’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:983:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_sockaddr_is_loopback(const struct sockaddr *sa)
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_h_addr2sockaddr’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1011:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_h_addr2sockaddr (krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_h_addr2addr’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1042:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_h_addr2addr (krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_anyaddr’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1073:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_anyaddr (krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_print_address’:
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1108:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_print_address (const krb5_address *addr,
 ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_address_order’:
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1238:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_address_order(krb5_context context,
 ^
addr_families.c:1238:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c: In function ‘krb5_free_address’:
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1333:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_free_address(krb5_context context,
 ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_copy_address’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1383:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_copy_address(krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_address_prefixlen_boundary’:
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1537:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_address_prefixlen_boundary(krb5_context context,
 ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
  CC       libkrb5_la-config_file.lo

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(Similar to Samba commit aa17db1f4061920512396032fcd3c7c8a4a8f38f)
2018-12-20 12:52:12 +11:00
Andreas Schneider
ce2df481b7 Fix size types
This fixes compilation with -Wstrict-overflow=2

with CFLAGS="-O3 -Werror=strict-overflow -Wstrict-overflow=2"
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) gives:

config_file.c: In function ‘krb5_config_vget_strings’:
config_file.c:1122:10: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow]
     while(nstr--)
          ^

Upstream pull request:
https://github.com/heimdal/heimdal/pull/354

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(similar to Samba commit 72979d1d60ca2eab1e7903c2e77b8cca69667691,
cut down to just the config_file.c and keytab_any.c changes reproduced
above by abartlet)
2018-12-20 12:52:12 +11:00
Andrew Bartlett
2ea34666d9 heimdal: Fix printing a short int into a string
The size of portstr is too small to print an integer.

Instead just let snprintf do the work.

This fixes building with GCC 7.1

Based on feedback by Jeffrey Altman

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12930

(Inspired by Samba commit abd74c3ba5e3ee3f5320bff6ed7dff4fbcb79373)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2018-12-20 12:52:12 +11:00
Andrew Bartlett
a3d8951df5 keytab: Avoid use of signed integer as a boolean
with CFLAGS="-O3 -Werror=strict-overflow -Wstrict-overflow=2"
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) gives:

keytab_any.c: In function ‘any_remove_entry’:
keytab_any.c:241:7: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow]
     if(!found)
       ^

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2018-12-20 12:52:12 +11:00
Noel Power
59aee7cad2 PY3: fix "TabError: inconsistent use of tabs and spaces"
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

(cherry-picked from Samba commit e8fec94827c933041acd5b447eeeefd0b7b507ef)
2018-12-19 19:44:05 -06:00
Luke Howard
5180a4ed75 asn1: maximum unsigned INTEGER range is 2^63 (#458)
As ranges are stored as signed 64-bit integers, they will be clamped to 2^63.
Do not use a maximum range of 2^64 in the test suite.
2018-12-20 12:23:13 +11:00
Luke Howard
efc5ad8b3c gss: cleanup warnings in HEIM_SLIST_ATOMIC_FOREACH (#447)
Cleanup unused result warning when calling heim_base_exchange_pointer()
from HEIM_SLIST_ATOMIC_FOREACH() in mechqueue.h.
2018-12-19 00:36:11 -08:00
Luke Howard
4a93c4774a gss: intern OIDs (#447)
Intern OIDs so that gss_release_oid() can be a NOOP.
2018-12-18 23:28:38 -06:00
Luke Howard
a8f0905b71 base: expose atomic operations internally (#447) 2018-12-18 23:28:38 -06:00
Luke Howard
ec88576ace roken: Solaris auxval test fails (#441)
The Solaris auxval test fails, because Solaris uses different preprocessor
symbols (and numbers) for its UID and GID auxval types.

Note that issuid() could simply be an alias of issetugid() on Solaris, so
perhaps this is not necessary.
2018-12-19 09:51:12 +11:00
Daria Phoebe Brashear
78c915f65a lex: %option not supported by solaris lex
it turns out that we don't need to tell lex we don't plan to use unput;
we can just.... not use unput. however, if we're flex, use the command
line option if it's available, to avoid warnings
2018-12-18 13:12:46 -06:00
Daria Phoebe Brashear
6b3ce5d229 libedit: make makelist compatible with solaris 10
solaris 10 tr doesn't support [:upper:] and [:lower:]; work around
since we only need ascii letters anyway
2018-12-18 13:12:46 -06:00
Quanah Gibson-Mount
c75bb31a9c For issue#381
Fix output to be grammatically correct.
2018-12-18 06:21:07 +13:00
Pavel Semerad
9f58896af9 Add missing initialization of kdc_offset in kcm
In KCM, when allocating new kcm_ccache struct, there is missing inicialization
of kdc_offset.  It is getting random values in my case and stored tickets are
unusable, last time I got this value to "klist -v": KDC time offset: 61 years
11 months 2 weeks 3 days 5 hours 28 minutes 32 seconds This commit seems to
correct it.
2018-12-14 17:05:37 -06:00
Isaac Boukris
30d16fd151 krb5tgs: use string representation in logs
Found by binary printouts in logs.

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
2018-12-14 16:59:45 -06:00
Isaac Boukris
751f561604 Correct S4U2Self spelling in a comment
Signed-off-by: Isaac Boukris <iboukris@gmail.com>
2018-12-14 16:59:44 -06:00
Isaac Boukris
9de0cd8f7e tests: fix kadmin5 wrapper from repeating flags
Signed-off-by: Isaac Boukris <iboukris@gmail.com>
2018-12-14 16:59:44 -06:00
Noel Power
5542a0ba16 PY3: make sure print stmt is enclosed by '(' & ')'
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from Samba merge request https://gitlab.com/samba-team/samba/merge_requests/68)
2018-12-14 16:39:55 -06:00
Noel Power
fa3c0031a8 Bulk: enclose .keys() method with list where list (from python2) expected
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from Samba commit 521bc6056edc5252f2256664f4eacba13a3749e3)
2018-12-14 16:39:55 -06:00
Noel Power
06143cc12b PY3: xrange->range
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from Samba commit e2c0af6bcdf271ff75c455695c129bc18322bd5a)
2018-12-14 16:39:55 -06:00
Noel Power
926b3aae82 PY3: string.upper not in PY3
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from Samba commit 899ef5d186c2c44f63c1cbf415daa33e9f668a5b)
2018-12-14 16:39:55 -06:00
Noel Power
76b2f15729 PY3: string.translate string.upper don't exist in PY3
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from Samba commit a0c8c8c8331856d9f09d18b389b7dd01c8d33de2)
2018-12-14 16:39:55 -06:00
Noel Power
96b410ed46 PY3: bytes.maketrans, string.maketrans is a PY2 only function
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from Samba commit b342e6f038b5277cf30115f11cf0f30d238c12ea)
2018-12-14 16:39:55 -06:00
Noel Power
07e3cbb7fb PY3: dict_keys doesn't have a sort method
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from Samba commit 0358d57db4705b2330e294b5d6318c1a78a8518c)
2018-12-14 16:39:55 -06:00
Noel Power
fc9aab949f PY3: dict doesn't have has_key
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from Samba commit 82c84513331da9d0f42ba73d03e58dce5d0f76d3)
2018-12-14 16:39:55 -06:00
Noel Power
f26b1cd599 PY3: iterkeys -> keys
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from Samba commit b2b0f8191dde58fe234b0147c4a0bd39020aa504)
2018-12-14 16:39:55 -06:00
Noel Power
965bb515ed PY3: iterkeys -> keys
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from Samba commit d20e85d008e1b7badbea5ada8b22639f7767a097)
2018-12-14 16:39:55 -06:00
Noel Power
f7c2860a36 PY3: dict has no iterkeys method
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from Samba commit c6884138e4c1aec80e8f99ef0978b43919ae9d3a)
2018-12-14 16:39:55 -06:00
Andrew Bartlett
de4fbc9514 lib/krb5: Do not re-send the AS-REQ if fast was disabled
Without this, in an AS-REQ that has no local key for FAST
we would send the AS-REQ again, which can bump the bad
password count on the KDC twice.

So only try again if FAST was actually tried.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2018-12-14 16:38:43 -06:00
YASUOKA Masahiko
4279b467cb Remove an extra line that uses "klist". The command was replaced with
"heimtools klist".
2018-12-14 16:31:42 -06:00
Olly Betts
7ad6c01a8d Fix assorted typos 2018-12-14 17:30:14 -05:00
Quanah Gibson-Mount
8d8920b079 Fixes https://github.com/heimdal/heimdal/issues/376 2018-12-14 16:03:34 -05:00
Rod Widdowson
136f8fb550 Windows: Avoid using deprecated function.
In VC15 GetVersionEx has been deprecated. In order to continue to
support Win2K use the undeprecated VerifyVersionInfoW API
(available since Win2K).

Inline helper functions used in latest Win10 SDK to simplify code.
2018-12-14 06:38:59 -05:00
Benjamin Kaduk
e21866f7a2 GSS unwrap: wipe copy of DES key when done with it
Zero out the DES_cblock structure instead of the (not yet used at this point
in the function) key schedule.  The contents could potentially be left
on the stack in the case of an error return from _gssapi_verify_pad().
2018-12-14 06:18:26 -05:00
CUI Hao (Lab)
0f7fc0fba6 Correct "princial" typos. 2018-10-08 08:46:37 -04:00
Romain Fihue
b0e4fcd257 hdb-mitdb: Commit 57f1545a broke support of REQUIRES_PWCHANGE during MIT DB imports 2018-10-03 20:03:03 -04:00
Benjamin Kaduk
56fe2f8620 Clear DES key (schedule) in unwrap BAD_MIC case
We generally clear out the cryptographic key and key schedule from
local variables before relinquishing control flow, but this case was
missed.  Reported by jhb@FreeBSD.org.
2018-09-22 13:25:00 -04:00
Jeffrey Altman
1feff82129 roken: gettimeofday using GetSystemTimePreciseAsFileTime
GetSystemTimeAsFileTime() has 16ms precision.

GetSystemTimePreciseAsFileTime() has <1ns precision but is only available
on Windows 8 or later.

This change dynamically loads GetSystemTimePreciseAsFileTime() if it is
available.

Change-Id: Ib9c616c01948384e6b256ac9b6023f1e39673613
2018-09-19 00:30:42 -04:00
Simon Wilkinson
07b3e6fd74 Allow zero-length encrypt IOVs in _krb5_evp_encrypt_iov_cts()
The iovec encryption code doesn't handle 0 length iovecs correctly.
Instead of just skipping them, _krb5_evp_encrypt_iov_cts() will spin
on the 0 length iovec.

Modify the _krb5_evp_iov_cursor_expand helper so that iovec expansion
simply skips 0 length iovecs, and make _krb5_evp_iov_cursor_nextcrypt
do the same.

Original bug report and tests from Andrew Bartlett <abartlet@samba.org>
2018-09-18 19:23:31 -04:00
Jeffrey Altman
d570541e3d Update accept_sec_context.c 2018-09-17 18:12:25 -04:00
Markus Moeller
635ac1aa85 Free context in case of error 2018-09-17 18:12:25 -04:00