Commit Graph

27779 Commits

Author SHA1 Message Date
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
Love Hörnquist Åstrand
1a616b0faf update copyright year 2014-02-18 08:34:32 -08:00
Love Hörnquist Åstrand
62b413b5df make quiet 2014-02-18 08:27:00 -08:00
Love Hörnquist Åstrand
a6e136c739 make quiet 2014-02-18 08:27:00 -08:00
Love Hörnquist Åstrand
f00a60e75c Merge pull request #64 from ktdreyer/openpty
roken: don't ignore HAVE_OPENPTY on linux
2014-02-17 15:29:34 -08:00
Love Hörnquist Åstrand
a332248e3b Merge pull request #65 from ktdreyer/gitignore-base64
ignore lib/base/base64.c in Git
2014-02-17 15:29:00 -08:00
Ken Dreyer
f8753adb64 ignore lib/base/base64.c in Git
lib/base/base64.c is an auto-generated file. Add it to the list in
.gitignore
2014-02-17 14:49:28 -07:00
Ken Dreyer
d0b70a463c roken: don't ignore HAVE_OPENPTY on linux
openpty() is not available on all Linux distributions. Trust autoconf's
determination for HAVE_OPENPTY instead of unconditionally using
openpty() on all Linux.
2014-02-17 14:40:33 -07:00
Love Hörnquist Åstrand
ea446ec1fd Merge pull request #62 from ktdreyer/rm-old-makefile-references
remove reference to pop3, telnet and rsh Makefiles
2014-02-17 12:33:41 -08:00
Love Hörnquist Åstrand
d8e347f04b Merge pull request #63 from ktdreyer/endif-cross
Properly terminate ifdef conditional in krb5-types.h
2014-02-17 12:33:21 -08:00
Ken Dreyer
10a7fb0bfa Properly terminate ifdef conditional in krb5-types.h 2014-02-17 13:25:16 -07:00
Ken Dreyer
505cdbefc2 remove reference to pop3, telnet and rsh Makefiles
The pop3, telnet and rsh/rcp support was removed from the tree in
e55b0d0ca5. Delete the corresponding
Makefiles so autoconf doesn't try to look for them.
2014-02-17 11:53:57 -07:00
Love Hörnquist Åstrand
514d4d3ef4 remove extra _ 2014-02-16 21:50:03 -08:00
Jeffrey Altman
f3d9d4119e export hx509_ca_tbs_set_signature_algorithm
hx509_ca_tbs_set_signature_algorithm was added by commit
c69c4634ad.  It must be exported
for use by hxtool on Windows.

Change-Id: I14b927abde96814ae2e0a90f232ab00915a9f29e
2014-02-16 21:01:57 -05:00
Love Hörnquist Åstrand
6a192f0dce clean files 2014-02-16 11:53:56 -08:00
Love Hörnquist Åstrand
dbf523a15d clean files 2014-02-16 11:52:22 -08:00
Love Hörnquist Åstrand
4fa77ebb03 clean files 2014-02-16 11:51:56 -08:00
Love Hörnquist Åstrand
923246a66e clean files 2014-02-16 11:51:25 -08:00
Love Hörnquist Åstrand
dffccabe31 clean files 2014-02-16 11:50:43 -08:00
Love Hörnquist Åstrand
1503257983 clean files 2014-02-16 11:50:34 -08:00
Love Hörnquist Åstrand
1223428b85 add missing files, sort stuff 2014-02-16 11:47:27 -08:00
Love Hörnquist Åstrand
03f75e380f set CODE_SIGN_IDENTITY when building 2014-02-16 11:45:13 -08:00