Commit Graph

1394 Commits

Author SHA1 Message Date
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
Love Hornquist Astrand
55db6909fe _kdc_pk_initialize needs to be exported for kdc-replay
prompted by patch from Gabor Gombas <gombasg@sztaki.hu>
2009-11-25 05:08:44 -08:00
Asanka Herath
b191b1e12f Make kdc build on windows
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-11-24 22:19:37 -08:00
Asanka Herath
d00f9984a5 Make roken build on windows
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-11-24 21:42:02 -08:00
Love Hornquist Astrand
f1c0c1bba3 prefix SOCKET symbols with rk_ 2009-11-25 05:29:18 +01:00
Love Hornquist Astrand
c6bbdb545b First drop of Windows build infrastructure from Secure Endpoints 2009-11-24 12:12:53 -08:00
Asanka Herath
19185e136f NTMakefile for kdc and exports.def for libkdc 2009-11-24 10:18:19 -08:00
Asanka Herath
6aa28bcc91 Don't use SIGPIPE, SIGXCPU or geteuid() if they aren't available
in kdc/main.c
2009-11-24 10:18:19 -08:00
Asanka Herath
fa8a92471c Don't build KRB4 specific code if we aren't supporting KRB4 2009-11-24 10:18:19 -08:00
Asanka Herath
8768960156 Don't rely on Posix like links in kdc 2009-11-24 10:18:19 -08:00
Asanka Herath
d47c01083b Use SOCKET data type instead of ints for sockets in kdc 2009-11-24 10:18:19 -08:00
Asanka Herath
b1063ea8fc Initial Windows port 2009-11-24 10:11:14 -08:00
Andrew Bartlett
25a2ac726b heimdal Fix invalid format string
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-11-23 20:36:54 -08:00
Love Hornquist Astrand
b1d26a6cba load pkinit bits 2009-11-22 17:34:57 -08:00
Love Hornquist Astrand
a895e85526 When a TS-ENC key was verified, send the salt for that key in the reply 2009-11-22 09:51:49 -08:00
Love Hornquist Astrand
2c14216733 don't override configuration if there is one 2009-11-22 08:41:10 -08:00
Love Hornquist Astrand
59d1bf12af use "headers.h", add usage 2009-11-22 06:54:11 -08:00
Love Hornquist Astrand
63db63e062 drop HAVE_CONFIG_H 2009-11-22 06:51:45 -08:00
Love Hornquist Astrand
ca6df0fffc remove sandbox for now since it also require a sandbox profile, and that is not ready yet 2009-11-22 06:46:25 -08:00
Love Hornquist Astrand
eeeff38603 switch to new syntax 2009-11-22 06:42:39 -08:00
Love Hornquist Astrand
270c4feaf1 add digest-service and announce 2009-11-22 06:42:14 -08:00
Love Hornquist Astrand
9fa76b8766 add missing argument 2009-11-22 06:41:57 -08:00
Love Hornquist Astrand
79fe41bbb9 cetype unused 2009-11-22 06:36:13 -08:00
Love Hornquist Astrand
6df0783c7e Redo client key handling for AS
Pick the replykey to be the same as the preauth key, this allows
us to delay the picking of client key to when its needed, this
means that we can have a reply keys for PKINIT that is independant
of what keys the client have.
2009-11-22 00:58:53 -08:00
Love Hornquist Astrand
dd67212157 add disable btmm support 2009-11-22 00:29:36 -08:00
Love Hornquist Astrand
847161193c constify pkinit conf 2009-11-22 00:28:33 -08:00
Love Hornquist Astrand
4d48b172ab add pkinit configration for btmm 2009-11-22 00:28:13 -08:00
Love Hornquist Astrand
72fbb8714f make pkinit non optional 2009-11-22 00:27:45 -08:00
Love Hornquist Astrand
010e7a9f5f announce realm via bonjour 2009-11-22 00:27:14 -08:00
Love Hornquist Astrand
71c6fa48f6 bonjour_announce 2009-11-22 00:26:57 -08:00
Love Hornquist Astrand
dbb5002e68 generic digest service 2009-11-22 00:26:32 -08:00
Love Hornquist Astrand
74cce43c8c make open log generic 2009-11-22 00:26:15 -08:00
Love Hornquist Astrand
04c3fc9882 add support for sandbox 2009-11-22 00:25:56 -08:00
Love Hornquist Astrand
b02039ae30 have require_hwauth 2009-11-22 00:25:31 -08:00