Commit Graph

28652 Commits

Author SHA1 Message Date
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
Markus Moeller
7b4ea9c42f Fix context etype leaks 2018-09-17 18:12:25 -04:00
Günther Deschner
27c6c1e177 s4-heimdal: Fix the format-truncation errors.
../lib/com_err/compile_et.c: In function ‘generate_h’:
../lib/com_err/compile_et.c:138:33: error: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 126 [-Werror=format-truncation=]
     snprintf(fn, sizeof(fn), "__%s__", hfn);
                                 ^~     ~~~
../lib/com_err/compile_et.c:138:5: note: ‘snprintf’ output between 5 and 132 bytes into a destination of size 128
     snprintf(fn, sizeof(fn), "__%s__", hfn);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/com_err/compile_et.c: In function ‘main’:
../lib/com_err/compile_et.c:234:35: error: ‘.h’ directive output may be truncated writing 2 bytes into a region of size between 1 and 128 [-Werror=format-truncation=]
     snprintf(hfn, sizeof(hfn), "%s.h", Basename);
                                   ^~
../lib/com_err/compile_et.c:234:5: note: ‘snprintf’ output between 3 and 130 bytes into a destination of size 128
     snprintf(hfn, sizeof(hfn), "%s.h", Basename);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/com_err/compile_et.c:235:35: error: ‘.c’ directive output may be truncated writing 2 bytes into a region of size between 1 and 128 [-Werror=format-truncation=]
     snprintf(cfn, sizeof(cfn), "%s.c", Basename);
                                   ^~
../lib/com_err/compile_et.c:235:5: note: ‘snprintf’ output between 3 and 130 bytes into a destination of size 128
     snprintf(cfn, sizeof(cfn), "%s.c", Basename);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

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

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jun  8 13:23:51 CEST 2018 on sn-devel-144
(cherry picked from Samba commit 7ddbf6035dfec6806536f99d0257245f70661363)
2018-09-10 21:18:39 -04:00
Chris Lamb
7f834b63cc Correct "explicity" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from Samba commit 45b14b18fe3f01ae8ea22afcd112205b8a4cf9bc)
2018-09-10 14:42:18 -04:00
Chris Lamb
6d4da04566 Correct "existence" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from Samba commit 5482e5426e09667d26e04dd0c6e0107e46e1028f)
2018-09-10 14:42:18 -04:00
Chris Lamb
946caad7d0 Correct "extention" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from Samba commit afa9bb4ac55d616fe7816e3830bab5e3a51aed7a)
2018-09-10 14:42:18 -04:00
Chris Lamb
aa119d1792 Correct "doesnt" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from Samba commit c4feed0b8cb6df71e14a30c07e4b5560368f54cc)
2018-09-10 14:42:18 -04:00
Chris Lamb
276476c595 Correct "updateing" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>

(cherry-picked from Samba commit fccdf34a0f7ebe510769743a99b9ef2da2a20045)
2018-09-10 14:42:18 -04:00
Chris Lamb
18619449e9 Correct "unavaible" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>

(cherry-picked from Samba commit 5c20790272456e547afb0ad72fb9284e2f14de30)
2018-09-10 14:42:18 -04:00
Chris Lamb
2f3f88e53a Correct "allignment" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>

(cherry-picked from Samba commit 8fcc49ecd44e69d7f9ada212c63896e0dcf488a4)
2018-09-10 14:42:18 -04:00
Chris Lamb
9c2351eb25 Correct "paramaters" typos.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>

(cherry-picked from Samba commit e0366ea49d5daa8fbf8b2ca22b1d3c77cc2daf9a)
2018-09-10 14:42:18 -04:00
Andrew Bartlett
d99b8acd1c do not dereference NULL pointer modules if we do not have dlopen
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2018-09-10 14:40:51 -04:00
Gary Lockyer
1c8cae58cc heimdal: Use #ifdef HAVE_DLOPEN around functions and variables used by HAVE_DLOPEN
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
2018-09-10 14:40:51 -04:00
Viktor Dukhovni
492910ec1e Don't lose error status in kadm5_s_init_with_context
If either krb5_parse_name() or _kadm5_acl_init() fail
we could return success and a NULL kadm5_handle.
2018-08-05 14:37:04 -04:00
Jeffrey Altman
0f91fefe42 Update ipropd_slave.c 2018-07-29 19:51:10 -04:00
Daria Phoebe Brashear
ee6f7402ca ipropd_slave: open hdb around kadm5_log_init in case recovery needed
log_init in the event a log is found will do recovery. kadm5_log_replay
will call methods which expect an hdb_db to be set but without this
none is
2018-07-29 19:51:10 -04:00