Commit Graph

829 Commits

Author SHA1 Message Date
Nicolas Williams
b6f4094cfe Add kvno for all keys to kadmin's get command's output
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-09-22 15:13:27 +02:00
Love Hörnquist Åstrand
63672067ea add nob for [kadmin]allow_self_change_password 2011-07-30 12:34:40 -07:00
Love Hörnquist Åstrand
8fccb51d49 Merge pull request #12 from nicowilliams/krb5_admin_patches_2nd
Krb5 admin patches 2nd

This has all the patches needed for krb5_admind to build and pass most tests, that includes:
- more kadm5 API compatibility (including very basic profile functionality)
- multi-kvno support (useful for key rollovers) (a test for this is included in tests/db/check-kdc)

Unfinished:
- password history (currently uses key history, needs to be separated and use digests)
- policies (only default policy allowed)
- mit kdb changes not tested yet


Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2011-07-24 15:41:36 -07:00
Nicolas Williams
11c54cd6c8 Protect against negative n_ks_tuple values and against randkey returning negative n_keys 2011-07-24 11:08:58 -05:00
Love Hörnquist Åstrand
12403a31ce sprinkle more windows files 2011-07-23 11:18:21 -07:00
Nicolas Williams
dfc7ec92fa Make kadm5_lock() and unlock work, and add kadmin commands for them.
The libkadm5 functions hdb_open() and close around all HDB ops.  This
meant the previous implementation of kadm5_lock() and unlock would
always result in a core dump.  Now we hdb_open() for write in
kadm5_lock() and hdb_close() in kadm5_unlock(), with all kadm5_s_*()
functions now not opening nor closing the HDB when the server context
keep_open flag is set.

Also, there's now kadmin(8) lock and unlock commands.  These are there
primarily as a way to test the kadm5_lock()/unlock() operations, but
MIT's kadmin.local also has lock/unlock commands, and these can be
useful for scripting (though they require much care).
2011-07-22 21:07:48 -05:00
Nicolas Williams
e23a1efdc9 Fixes for updates of KADM5_KVNO but not KEY_DATA and vice-versa.
It turns out that updates of kvno but not key data and vice-versa are
both, allowed and actually done (e.g, in kadmin's ank).  Doing the right
thing in these cases turns out to be a bit tricky, but this commit ought
to do it.
2011-07-22 16:07:10 -05:00
Nicolas Williams
dae01950a2 add_enctype needs to set the kvno of the keys it adds!
add_enctype() was not fetching the kvno of the principal it was
modifying, and it was not setting the kvno of the new keys (instead it
set it to 0).  This worked fine before multi-kvno, but broke then.  The
fix is to fetch the kvno and set the new keys' kvno to that.

I'm thinking of adding a new kadmin command to prune old kvnos by date
or kvno differential...
2011-07-22 16:07:10 -05:00
Nicolas Williams
a246c394d2 Fix warnings. 2011-07-22 16:07:08 -05:00
Nicolas Williams
e020dc25b8 Fix a double free in ank.c. 2011-07-22 16:07:08 -05:00
Nicolas Williams
ed511e06f9 Updated kadmind.8 and kadmin.8. 2011-07-22 16:07:07 -05:00
Nicolas Williams
f2bb83c088 Add default to policy prompt and fix harmless bug in edit_policy() 2011-07-22 16:07:06 -05:00
Nicolas Williams
a1203a703d Re-fix an earlier mistake that fell out in a branch switcheroo. 2011-07-22 16:07:06 -05:00
Nicolas Williams
0d90e0c4d0 Complete --keepold support and fix crasher in kadmin cpw -r --keepold. 2011-07-22 16:07:06 -05:00
Nicolas Williams
2510d2d8fc Oops, reverse sense of get-keys check... 2011-07-22 16:07:06 -05:00
Nicolas Williams
f15745c60c Forgot to save edits to kadmin/server.c to use the new get-keys authorization. 2011-07-22 16:07:06 -05:00
Nicolas Williams
fad463bbd9 Fix policy validation bug (parse_policy() should return success when the policy name is OK!) 2011-07-22 16:07:06 -05:00
Nicolas Williams
e16360e2db Add --keepold option to cpw. 2011-07-22 16:07:05 -05:00
Nicolas Williams
af23757829 Trivial policy bug fix. 2011-07-22 16:06:01 -05:00
Nicolas Williams
fac34871be More kadmin support for kvno diff policy. 2011-07-22 16:06:01 -05:00
Nicolas Williams
c2ec368c36 Add HDB extension for storing policy regarding what historic keys may be used for 2011-07-22 16:06:00 -05:00
Nicolas Williams
1f349a6aba kadmin support for policies. 2011-07-22 16:05:21 -05:00
Nicolas Williams
e8e314bbb1 Beginning of another new kadm5 function. Need to switch branches for a bit. 2011-07-22 16:04:52 -05:00
Nicolas Williams
6e04b05e9d Initial support for kadm5_randkey_principal_3(), needed by krb5_admin.
NOT TESTED YET.
2011-07-22 16:04:52 -05:00
Love Hörnquist Åstrand
7aaba443bc add NTMakefile and windows directories 2011-07-17 12:16:59 -07:00
Love Hörnquist Åstrand
277bec06e7 simplify error printing, context contains error 2011-06-14 07:11:43 -07:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Thomas Klausner
db8e287e41 Use "Fl Fl" for long options.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-05-21 11:54:14 -07:00
Jeffrey Altman
6850d6a65f avoid uninit variable and unreachable code warnings
most of these warnings are not problems because of ample
use of abort() calls.  However, the large number of warnings
makes it difficult to identify real problems.  Initialize
the variables to shut up the compilers.

Change-Id: I8477c11b17c7b6a7d9074c721fdd2d7303b186a8
2011-05-17 12:02:16 -04:00
Love Hornquist Astrand
b1909b2daa Fixes from NetBSD via Thomas Klausner and Roland C. Dowdeswell 2011-05-04 21:31:10 -07:00
Love Hornquist Astrand
9a1a5e5da6 Mandoc and spelling fixes from Thomas Klausner 2011-04-29 20:37:33 -07:00
Love Hornquist Astrand
f5f9014c90 Warning fixes from Christos Zoulas
- shadowed variables
- signed/unsigned confusion
- const lossage
- incomplete structure initializations
- unused code
2011-04-29 20:25:05 -07:00
Love Hornquist Astrand
2bcacbd052 patch from Christos Zoulas 2011-04-23 18:27:35 -07:00
Love Hornquist Astrand
17b38758ff patch from Christos Zoulas 2011-04-23 18:25:40 -07:00
Love Hornquist Astrand
e307a6f350 init max_life and max_rlife 2010-11-27 11:04:55 -08:00
Asanka C. Herath
f40fe926ad Windows: Comprehensive clean target 2010-11-24 15:32:13 -05:00
Love Hornquist Astrand
a85c548fd1 wait for dead children, and then abandon the live ones 2010-10-30 12:15:04 -07:00
Love Hornquist Astrand
2a2b229efc reap all zombie children, promted by bug report from Patrik Lundin 2010-10-27 19:34:28 -07:00
Anton Lundin
eac56da073 Rename struct to not clash with aix header sys/proc.h
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-09-16 22:47:27 -07:00
Russ Allbery
ce438f343c Fix error reporting prefix for kadmin list
Pass the function name into foreach_principal instead of the static
"get" string, so the correct function is reported in errors in
kadmin list.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-09-01 22:59:30 -07:00
Russ Allbery
890c797f68 Don't retrieve principal data for kadmin list
kadmin list and kadmin get -t used the same output display logic
as short output, which meant that they called kadm5_get_principal
for each principal.  However, they then just threw that output
away since the terse format displays only the principal name.

For terse get output, instead use a separate set of functions that
just print the string version of the principal name and do not
retrieve additional information.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-09-01 22:59:12 -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
Love Hornquist Astrand
433b1d5073 drop RCSID 2010-03-16 12:52:58 -07:00
Ingo Schwarze
0b2eece5be Do not use nested displays. Found by and unbreaking the build with mandoc(1). I will also send this patch upstream. OK todd@ jmc@
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-02-20 11:21:26 -08:00
Russ Allbery
d5970c0851 Report mkvno as unknown
When the principal is retrieved from the database via libkadm5srv, the
keys are always decrypted, so the reported mkvno is always 0.  Rather
than returning 0 and implying that the key in the database is not
encrypted, report the mkvno as unknown for right now.

A better fix is required to either not decrypt the keys when retrieving
get information or to get the mkvno before keys are decrypted.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-02-02 19:36:20 -08:00
Love Hornquist Astrand
117652f353 Disable kadmind.exe since currently it doesn't build 2010-02-02 19:29:55 -08:00
Love Hornquist Astrand
b914fd57c5 remove NO_INETD by shuffling code around 2009-12-25 06:37:57 +01:00
Love Hornquist Astrand
93e0cc80f4 make use rk_SOCK_ERRNO, make compile again 2009-12-23 14:36:52 +01:00
Love Hornquist Astrand
be73fa4687 use krb5_socket_t 2009-12-23 14:12:38 +01:00