Commit Graph

28523 Commits

Author SHA1 Message Date
Quanah Gibson-Mount
e7879208e4 Fixes https://github.com/heimdal/heimdal/issues/310, use PF_UNIX instead
of PF_LOCAL
2017-09-25 18:31:42 -05:00
David Mulder
2548b3b8aa Solaris 8 x86 uses ->d_fd not ->dd_fd or dirfd() 2017-09-25 18:26:35 -05:00
Francisco Blas (klondike) Izquierdo Riera
d6979fcc40 Allow LDAP modifications for entry creation
Heimdal will refuse to create new entries when an entry already exists even
if said entry has no kerberos info and is a new entry.

This patch fixes this issue by allowing object modifications even if the
flags disallow them when we are inserting a new principal on the database.

Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
2017-09-25 18:24:23 -05:00
Quanah Gibson-Mount
f4bb4df4a6 Fixes https://github.com/heimdal/heimdal/issues/308 2017-09-25 18:22:45 -05:00
Quanah Gibson-Mount
05d527706a Cleanup 2017-09-25 18:21:59 -05:00
Quanah Gibson-Mount
e007cdd0f4 Fixes https://github.com/heimdal/heimdal/issues/309 2017-09-25 18:21:59 -05:00
Russ Allbery
c3b3c2ec8e Close memory leak in external_passwd_quality
If the external password quality program returned a failure
message, the unparsed form of the principal name was never
freed.  Free it.
2017-09-25 18:18:55 -05:00
Russ Allbery
7b15a833a3 Set default principal for password change to credential client
The default client principal for krb5_set_password, if the
principal argument were NULL, was krb5_get_default_principal.  But
krb5_set_password requires credentials for the password change service
be passed in, and those credentials are already associated with a
client principal that's much more likely to be the correct choice for
a default.  Use that principal instead of krb5_get_default_principal.
2017-09-25 18:17:01 -05:00
Andreas Schneider
ccb63bb0aa lib: Fix printing a short into portstr
The size of portstr is too small to print an integer and we should print
a short anyway.

This fixes building with GCC 7.1
2017-09-25 18:16:18 -05:00
Stefan Metzmacher
a79b59ba27 kdc: fix dh->q allocation check in get_dh_param()
Thanks to Doug Nazar <nazard@nazar.ca> for spotting this!

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2017-09-25 18:10:29 -05:00
Roland C. Dowdeswell
8c18131c13 Have roken.h #include <util.h> to find emalloc on some platforms. 2017-09-25 18:01:19 -05:00
Viktor Dukhovni
aef3843b55 Add missing semicolons 2017-08-23 17:06:29 -04:00
Viktor Dukhovni
766e6cda8a Avoid potential memory leak in krb5_sendto_set_hostname
If the hostname was already set, a typo in a test meant we were not
freeing it.  While we're at it, handle the unlikely possibility that
the existing pointer is passed as the new value.
2017-08-23 15:10:38 -05:00
Viktor Dukhovni
d73ec2510a Try to avoid parse_{time,units,flags} symbol conflicts
On Debian stretch systems PAM modules linked against Heimdal run into
symbol conflicts with parse_time() in systemd libraries.  We redefine
parse_time() and friends to rk_parse_time(), ... while keeping the old
names for ABI compatibility with existing clients.

The legacy names should eventually be droppped.
2017-08-23 15:09:11 -05:00
Jeffrey Altman
237cd892d9 kdc: unused pid element is (pid_t)-1 not zero
When the termination of a child process is observed by reap_kid() it
clears the pids[] element by assigning it the invalid pid value
(pid_t)-1. However, start_kdc() assumes that the unused pid[[] element
value is 0.  As a result, each pid[] element's associated child process
can only be restarted once since start_kdc() will not be able to locate
an unused element.

This change alters start_kdc() to initialize all elements of pids[] to
(pid_t)-1 and use that as the marker for unused elements.  By doing so
start_kdc() can properly record child process pids and indefinitely
restart child processes as necessary.

Change-Id: Ia93c9284ab21289994eca7fc9cf1278be7c00683
2017-07-27 22:03:51 -05:00
Quanah Gibson-Mount
b787491942 Fixes https://github.com/heimdal/heimdal/issues/294 2017-07-22 11:36:41 -04:00
Viktor Dukhovni
3910c23378 Retain ret != 0 when capaths finds no match. 2017-07-12 07:27:31 -04:00
Jeffrey Altman
6dd3eb836b CVE-2017-11103: Orpheus' Lyre KDC-REP service name validation
In _krb5_extract_ticket() the KDC-REP service name must be obtained from
encrypted version stored in 'enc_part' instead of the unencrypted version
stored in 'ticket'.  Use of the unecrypted version provides an
opportunity for successful server impersonation and other attacks.

Identified by Jeffrey Altman, Viktor Duchovni and Nico Williams.

Change-Id: I45ef61e8a46e0f6588d64b5bd572a24c7432547c
2017-07-10 16:51:25 -04:00
Nicolas Williams
0fc03c5c6b Travis: fix cpp-coveralls invocation 2017-05-30 12:34:46 -05:00
Nicolas Williams
49ec30d87d Travis: re-enable gcov build 2017-05-29 01:19:43 -05:00
Nicolas Williams
07c34504a6 Fix gcov build 2017-05-29 01:18:48 -05:00
Nicolas Williams
2c913b4bf7 Fix typo in d999ac7 2017-05-29 00:49:58 -05:00
Nicolas Williams
d2b1b74f04 Travis: disable gcov build for now 2017-05-28 17:42:51 -05:00
Nicolas Williams
3973d4fc5f Travis: use clang and gcc 2017-05-28 16:58:39 -05:00
Nicolas Williams
0f93e3ec52 Travis: fix OS X build 2017-05-28 16:58:39 -05:00
Nicolas Williams
d05f701b8b Travis: build on OS X too 2017-05-28 16:58:39 -05:00
Nicolas Williams
de7a1911cd Travis: attempt gcov build 2017-05-28 16:58:39 -05:00
Nicolas Williams
f5660e82ea Travis: use make -j3 2017-05-28 16:58:39 -05:00
Nicolas Williams
b46ebe35e2 Travis: send coverity build email to builders 2017-05-28 16:58:39 -05:00
Nicolas Williams
d999ac7026 Quiet warning about rk_getprocauxval() 2017-05-28 16:58:38 -05:00
Viktor Dukhovni
8a0186c5b9 Fix missing wait_for in check-iprop 2017-05-28 16:58:02 -05:00
Viktor Dukhovni
2d968c5c88 Fix test-auxval typos hidden by platform dependence 2017-05-27 00:08:00 -05:00
Nicolas Williams
122cdc578e Fix some krb5_storage_write() usages 2017-05-26 23:24:30 -04:00
Nicolas Williams
2c542ce8b1 Better corrupt keytab recovery? 2017-05-26 23:24:30 -04:00
Nicolas Williams
a7e585c85e Fix storage usage in lib/krb5/keytab_file.c 2017-05-26 23:24:30 -04:00
Nicolas Williams
48c137f355 Use stdio for keytab operations
Unlike the ccache, we can't lock less because of the way in which keytab
entries are removed: by negating their length.  Also unlike ccaches, we
hold locks across the entirety of keytab iteration.
2017-05-26 23:24:30 -04:00
Nicolas Williams
322b166c37 Use stdio, lock less to make FILE ccache faster
Use stdio.  Don't lock to read -- we only ever rename new ccaches into
place, or overwrite endtimes to delete entries, or overwrite part of the
realm name of cc config entries.

Dropping locks around ccache iterator stepping strongly implied that we
don't expect truncation, that we only expect appends (and the
overwriting done to delete entries).

Don't unlock -- let close(2) do it, thus making fewer system calls.
2017-05-26 23:24:30 -04:00
Nicolas Williams
c01c48e0f4 Add stdio-based krb5_storage 2017-05-26 23:24:30 -04:00
Nicolas Williams
123f702001 lib/roken: add fseeko()/ftello() 2017-05-26 23:24:30 -04:00
Nicolas Williams
3fb30ff0a6 Fix fd_store() return value for short writes 2017-05-26 23:24:30 -04:00
Nicolas Williams
e17cbff0ae Fix fd_fetch() return value for short reads 2017-05-26 23:24:30 -04:00
Nicolas Williams
c551ad9458 Fix Appveyor build: lib/hx509 2017-05-26 23:24:30 -04:00
Nicolas Williams
5a13323b68 Fix Appveyor build: lib/asn1 2017-05-26 23:24:30 -04:00
Nicolas Williams
715cb46de6 Fix Appveyor build: lib/com_err 2017-05-26 23:24:30 -04:00
Nicolas Williams
4a9591af92 Quiet windows warning about struct passwd 2017-05-26 23:24:30 -04:00
Nicolas Williams
e0dbb59a48 Appveyor: save artifacts on failure 2017-05-26 23:24:30 -04:00
Viktor Dukhovni
5b39bd7c1d New KRB5_NO_TICKET_STORE env var 2017-05-26 10:53:37 -05:00
Aleksei Martynov
a666bf165e Fix memory leak in _gss_ntlm_release_cred.
ntlm_cred is always allocated with calloc, so we need to free the cred
object too, similarly to what _gsskrb5_release_cred does.
2017-05-22 12:05:00 -05:00
Nicolas Williams
23ad4341f8 Add markdown README, build badges 2017-05-16 19:31:09 -05:00
Nicolas Williams
4fe6c93ccd Fix copy_cred_cache usage 2017-05-16 16:44:32 -05:00