Commit Graph

1577 Commits

Author SHA1 Message Date
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
Russ Allbery
f3a559b3c2 Ensure data structures allocated by hprop are initialized
Use calloc instead of malloc when allocating data structures while
importing a dump in hprop.  Fixes a crash in hprop when reading MIT
dump files due unintialized memory in the Salt data structure, plus
will be more robust against any future changes to the data model.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-02-02 20:43:48 -08:00
Russ Allbery
3d715adc21 Rename the database after closing it in hpropd
If a Berkeley DB database is used as the underlying database, renaming
the database before closing it can produce error messages like the
following on close:

/var/lib/heimdal-kdc/heimdal~.db: unable to flush: No such file or directory

since the underlying database library caches the old file name.  There
is a rename() method in the Berkeley DB API, but it also invalidates
the database handle and requires that it be reopened.  Since the
hdb_rename implementation does not require that the database be open,
close the database before renaming it to avoid this problem.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-02-02 13:27:48 -08:00
Russ Allbery
20c65310ea Support MIT dump formats 5 and 6 in hprop
Dump formats 5 and 6 differ from the supported version 4 dump format
only in that they include policy information for each principal in an
extension that the dump parsing code already knows how to ignore and
that they include policy lines.  Ignore the policy information, since
there isn't a corresponding concept in Heimdal, and accept the new
dump format versions.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-02-02 13:27:36 -08:00
Russ Allbery
73d0fc23a4 Store last password change date when parsing MIT dumps in hprop
If the MIT dump file includes a last password change date, allocate
a database extension structure to hold that information and include
it in the corresponding Heimdal database entry.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-02-02 13:27:10 -08:00
Russ Allbery
01d54cacc9 Allow weak crypto in hprop
hprop may be decrypting an old database encrypted with a DES master
key, in which case it shouldn't fail because DES is disabled by default.

This could permit weak enctypes to be used when authenticating to a
remote hpropd, although stronger enctypes are still preferred.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-01-27 21:57:32 -08:00
Love Hornquist Astrand
51717efb34 Export kdc_check_flags, requested by Jelmer Vernooij in Debian bug #56275 2010-01-02 17:51:57 +01:00
Asanka Herath
ff11a8ae43 Merge remote branch 'lha/master' into win32-port2
* lha/master:
  Clean kadm5-pwcheck.h
  rename closesocket to rk_closesocket
  Log what principal was used in the failure case
2009-12-22 11:05:03 -05:00
Love Hornquist Astrand
10a5976e45 Log what principal was used in the failure case 2009-12-22 07:36:01 +01:00
Asanka Herath
a0ae9f5a0e Merge remote branch 'h-github/master' into win32-port2
* h-github/master: (64 commits)
  refix socket wrappers with rk_
  Patch from Secure Endpoints/Asanka Herath for windows support
  unset KRB5CCNAME
  its really just LIBADD more most of them
  correct quoting
  Use -lpthread for modern freebsd instead
  clean KRB5CCNAME and KRB5_CONFIG, require test to reset them
  more up ${env_setup}
  use PTHREADS_LIBADD for freebsd6 and newer
  add PTHREAD_LIBADD
  add PTHREAD_LIBADD
  add PTHREAD_LIBADD
  switch to PTHREADS_LIBADD
  log what the error string say too
  More debug logging
  sprinkle more 'echo "test failed"'
  sprinkle 'echo "test failed"'
  use calloc(), indent more prettier
  in sh, equal compare is really = for strings, not ==
  Check for duplicates, already loaded mechs
  ...

Conflicts (resolved):
	lib/krb5/auth_context.c
	lib/krb5/changepw.c
	lib/krb5/context.c
	lib/krb5/error_string.c
	lib/krb5/kuserok.c
	lib/krb5/libkrb5-exports.def.in
	lib/krb5/net_write.c
	lib/krb5/store_fd.c
	lib/krb5/test_cc.c
	lib/roken/strerror_r.c
2009-12-21 13:44:00 -05:00
Love Hornquist Astrand
c867fd3e2e Make libtool pull in the depenency on libldap
Put in explicy depenency on libdap so that libtool
might to the right thing for us.

Patch from Jan Rekorajski
2009-12-08 00:15:10 -08:00
Asanka Herath
0346adf7f6 (kdc/NTMakefile) Fix dependencies 2009-12-01 16:44:08 -05:00
Asanka Herath
6f22fb3bb1 (kdc/kerberos5.c) VC isn't C99 2009-12-01 16:43:39 -05:00
Asanka Herath
a4acca45ec (kdc/hpropd.c) inetd_flag is used even when NO_INETD is defined 2009-12-01 16:43:12 -05:00
Asanka Herath
0ad290b500 Fix missing #endif 2009-12-01 16:42:28 -05:00
Asanka Herath
0a43d2b3cf (kdc) Add missing export 2009-12-01 02:56:58 -05:00
Love Hornquist Astrand
86f4c66efd Merge branch 'master' into wip/win32-port2 2009-11-25 05:41:14 -08:00