Commit Graph

1443 Commits

Author SHA1 Message Date
Love Hornquist Astrand
00b3524892 link with libheimntlm.la 2011-04-14 12:54:15 -07:00
Stefan Metzmacher
a02402bb19 HEIMDAL:kdc: correctly propagate HDB_ERR_NOT_FOUND_HERE to via tgs_parse_request() and _kdc_tgs_rep()
metze

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-03-12 11:37:13 -08:00
Jelmer Vernooij
e380769729 kdc.h: Include hdb.h first, so kdc.h can be included standalone.
This makes it a bit easier to find libhdb in e.g. configure tests and
is consistent with the main header files for the other Heimdal
libraries, none of which has any prerequisite other headers.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-02-26 13:06:15 -08:00
Andrew Bartlett
6ee82593ec heimdal Pass F_CANON down to the hdb layer for servers in AS-REP as well
This fixes Win2003 domain logons against Samba4, which need a
canonicalised reply, and helpfully do set that flag.

Specifically, they need that realm in krbtgt/realm@realm that these
both match exactly in the reply.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Feb 17 06:40:53 CET 2011 on sn-devel-104

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-02-23 19:46:21 -08:00
Love Hornquist Astrand
b746f1ce34 add _kdc_db_fetch and _kdc_free_ent for digest-service 2011-01-30 12:12:30 -08:00
Asanka C. Herath
6d662f71d7 Windows: Fix export lists 2010-11-29 10:53:49 -05:00
Love Hornquist Astrand
290aed8056 add missing ; 2010-11-28 19:49:27 -08:00
Andrew Bartlett
b819f1fe2b Push PKINIT configuration into default_config.c
The interaction with Samba4 is subtle - it calls
krb5_kdc_get_config(), but not configure() - but must have PKINIT set
up.

Andrew Bartlett

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-11-28 19:45:18 -08:00
Andrew Bartlett
64a326d33b heimdal Fetch the client before the PAC check, but after obtaining krbtgt_out
By checking the client principal here, we compare the realm based on
the normalised realm, but do so early enough to validate the PAC (and
regenerate it if required).

Andrew Bartlett

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-11-28 19:44:49 -08:00
Andrew Bartlett
2542e40fed heimdal Fix handling of backwards cross-realm detection for Samba4
Samba4 may modify the case of the realm in a returned entry, but will no longer modify the case of the prinicipal components.

The easy way to keep this test passing is to consider also what we
need to do to get the krbtgt account for the PAC signing - and to use
krbtgt/<this>/@REALM component to fetch the real krbtgt, and to use
that resutl for realm comparion.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Nov 15 08:47:44 UTC 2010 on sn-devel-104

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-11-28 19:41:13 -08:00
Andrew Bartlett
10f9468f9d heimdal Return HDB_ERR_NOT_FOUND_HERE to the caller
This means that no reply packet should be generated, but that instead
the user of the libkdc API should forward the packet to a real KDC,
that has a full database.

Andrew Bartlett

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-11-28 19:40:07 -08:00
Love Hornquist Astrand
4cdd645ff4 add backends implement hdb_fetch_kvno, use it 2010-11-28 11:35:41 -08:00
Andrew Bartlett
f469fc6d49 heimdal Add support for extracting a particular KVNO from the database
This should allow master key rollover.

(but the real reason is to allow multiple krbtgt accounts, as used by
Active Directory to implement RODC support)

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-11-28 09:52:54 -08:00
Love Hornquist Astrand
9fba958c90 remove kadb leftovers 2010-11-26 10:31:37 -08:00
Asanka C. Herath
7df6a8758b Windows: Adjust for missing export 2010-11-24 15:33:26 -05:00
Asanka C. Herath
0d93ecd4e3 Windows: Don't build kaserver 2010-11-24 15:33:25 -05:00
Asanka C. Herath
880d728e02 Un-const as necessary to silence compiler warnings 2010-11-24 15:33:07 -05:00
Asanka C. Herath
f40fe926ad Windows: Comprehensive clean target 2010-11-24 15:32:13 -05:00
Love Hornquist Astrand
fae3d127a2 remove krb4 support 2010-11-20 14:38:21 -08:00
Love Hornquist Astrand
cc42e85e7f Remove deprecated krb4 kdc components 2010-11-20 14:11:35 -08:00
Love Hornquist Astrand
09c0c65d6f remove v4 support for hprop 2010-11-20 13:26:40 -08:00
Andrew Bartlett
79bf21032a Add new external function krb5_kdc_pkinit_config()
This starts up the pkinit configuration and sets some default values,
and is needed in a seperate function so Samba4 can call it from it's
own KDC wrapper.

Andrew Bartlett

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-11-11 20:42:51 -08:00
Joerg Pulz
03dfe132d0 Make build w/o PKINIT
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-10-18 08:28:42 -07:00
Andrew Bartlett
b78419f126 heimdal use returned server entry from HDB to compare realms
Some hdb modules (samba4) may change the case of the realm in
a returned result.  Use that to determine if it matches the krbtgt
realm also returned from the DB (the DB will return it in the 'right' case)

Andrew Bartlett

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-10-02 20:46:49 -07:00
Andrew Bartlett
76266ab5ac s4:heimdal Create a new PAC when impersonating a user with S4U2Self
If we don't do this, the PAC is given for the machine accout, not the
account being impersonated.

Andrew Bartlett

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-09-26 15:15:18 -07:00
Andrew Bartlett
0e128912af s4:heimdal Add hooks to check with the DB before we allow s4u2self
This allows us to resolve multiple forms of a name, allowing for
example machine$@REALM to get an S4U2Self ticket for
host/machine@REALM.

Andrew Bartlett

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-09-26 15:11:05 -07:00
Love Hornquist Astrand
2f9f212980 remove unused header file 2010-09-19 01:47:32 -07:00
Anton Lundin
46a4a64dfe ifdef away code to be able to build with --disable-krb4
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-09-16 22:47:14 -07:00
Love Hornquist Astrand
3bf10b6901 move out kdc_locl.h 2010-09-08 09:59:57 -07:00
Love Hornquist Astrand
513a27a961 make conditional on apple and have_gcd 2010-09-08 09:50:50 -07:00
Asanka Herath
cdcdc5cad5 Windows: Version information for binaries 2010-08-20 13:06:54 -04:00
Asanka Herath
d83611238a Windows: Build a single heimdal.dll
Heimdal.dll is a combination of libasn1, libwind, libhcrypto, libhx509
and libkrb5.
2010-08-20 13:06:54 -04:00
Asanka Herath
ea4d8dbfdb Windows: Use EXEPREP and DLLPREP macros for processing binaries
Once DLLs and EXEs are built, they need to have their manifests
processed and signed.  These steps are encapsulated in the EXEPREP and
DLLPREP Makefile macros.  Use them instead of invoking each processing
macro individually.
2010-08-20 13:04:06 -04:00
Love Hornquist Astrand
4f11e546b5 comment + indent 2010-06-29 11:38:12 -07:00
Love Hornquist Astrand
a36f3c7d2a if its a multiline query, truncate after the first line 2010-06-29 11:37:44 -07:00
Love Hornquist Astrand
7639f83561 Use right length. Pointed out by Tom Yu 2010-06-28 20:22:22 -07:00
Love Hornquist Astrand
6e05462c1e DH_compute_key might not include zero pre-filling, add it back. Reported by Tom Yu of MIT Kerberos 2010-06-28 21:50:43 +02:00
Love Hornquist Astrand
4c43f933d3 split signedpath from PAC verification 2010-06-12 21:34:55 -07:00
Love Hornquist Astrand
a70b912972 only resign PAC if there is a verified PAC on the way in 2010-06-11 09:55:10 -07:00
Love Hornquist Astrand
75c8250abf Tell if we manged to verify the PAC or not 2010-06-11 09:53:47 -07:00
Love Hornquist Astrand
faa1528394 make http transport work again 2010-06-02 08:32:03 -07:00
Love Hornquist Astrand
7ecd5b5f9d Check NULL pointer before dereference them
Found by Russ Allbery
2010-05-26 11:45:17 -05:00
Love Hornquist Astrand
c29933e1f5 set reply_key to NULL 2010-04-07 23:01:46 -07:00
Love Hornquist Astrand
d3efb7d043 don't bother supporting KRB5_AUTHDATA_SIGNTICKET_OLD 2010-03-19 13:58:45 -07:00
Love Hornquist Astrand
24e2001f51 support old SIGNTICKET too 2010-03-19 13:56:20 -07:00
Love Hornquist Astrand
523c393829 Better error message for decomp 2010-03-17 06:21:56 -07:00
Love Hornquist Astrand
dde9ae659b drop RCSID 2010-03-16 12:50:09 -07:00
Russ Allbery
5230b2f8f5 Discard old keys in MIT dump files in hprop
An MIT dump file may contain multiple key sets for one principal, with
different kvnos.  The Heimdal database can only represent a single
kvno, and previously the kvno was set to the last key found in the entry
and all keys were added to the entry.  Since kvnos are given from high
to low in the database dump, this would result in the principal getting
the kvno of the oldest key and all keys stored without regard for kvno.

Instead, ignore all keys with kvnos lower than the first kvno we see and
only store keys with a kvno matching it.  If we see a key with a kvno
higher than the first kvno we see, exit with an error since that case is
not currently handled (and should not happen in a typical MIT database
dump).

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-03-16 11:48:15 -07:00
Love Hornquist Astrand
f2611400b0 Set e_text for more cases 2010-03-07 02:44:25 -08:00
Guido Günther
45a94f309b Use libcapng to drop all privileges
except for CAPNG_NET_BIND_SERVICE so we can bind to ports < 1024.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-02-18 19:08:45 -08:00