Commit Graph

34 Commits

Author SHA1 Message Date
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
a35ea4955a create_principal() must memset(ent, 0, ...) before ever returning (fixes core dump) 2011-07-22 16:07:06 -05:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Love Hörnquist Åstrand
be0941cb08 catch failure
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25204 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-09 14:21:40 +00:00
Love Hörnquist Åstrand
1e42fab0f0 use krb5_principal_get_realm
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25116 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-16 08:10:12 +00:00
Love Hörnquist Åstrand
6937d41a02 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898 switch to utf8 encoding of all files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
6e20758fda Write log entry after store is successful.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20607 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-05-08 07:11:11 +00:00
Love Hörnquist Åstrand
cb704efeeb Rename u_intXX_t to uintXX_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17445 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-05 10:37:46 +00:00
Love Hörnquist Åstrand
a680a138f2 (create_principal*): If client doesnt send kvno, make sure to set it to 1.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17233 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-25 12:38:45 +00:00
Love Hörnquist Åstrand
0c2369acd0 Wrap hdb_entry with hdb_entry_ex, patch originally from Andrew Bartlet
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16378 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-12-12 12:40:12 +00:00
Love Hörnquist Åstrand
dd88e2f3fb (kadm5_s_create_principal): remove old XXX command and related code,
_kadm5_set_keys will do all this now


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13472 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-03-07 22:43:46 +00:00
Love Hörnquist Åstrand
40ac026c53 (kadm5_s_create_principal_with_key): don't call _kadm5_set_keys2,
create_principal will do that for us. But set kvno to 1.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13408 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-02-29 06:07:32 +00:00
Love Hörnquist Åstrand
0540f13b86 prefix all struct HDB elements with hdb_
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12880 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-09-19 00:25:35 +00:00
Assar Westerlund
c7c19f07f3 adapt to new hdb_seal_keys and hdb_unseal_keys
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9595 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-01-30 01:24:29 +00:00
Johan Danielsson
bb90aecaee pass context to seal/unseal_keys
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8551 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-05 13:17:32 +00:00
Assar Westerlund
58ef87aed8 update to new prorotype of _kadm5_setup_entry and _kadm5_set_keys
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8059 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-03-23 23:01:40 +00:00
Johan Danielsson
c5b916ca6f remove advertising clause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7464 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 17:05:13 +00:00
Assar Westerlund
60af6a3d15 (create_principal): if there's no default entry the mask should be
zero


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6280 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-05-23 06:45:18 +00:00
Assar Westerlund
45fbb9045b call new _kadm5_setup_entry
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6131 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-05-04 18:42:43 +00:00
Assar Westerlund
fd11402e8c (get_default): check return value
(create_principal): send wider mask to _kadm5_setup_entry


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6124 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-05-04 17:41:21 +00:00
Johan Danielsson
c3e59002fe add flags to fetch and store; seal keys before logging
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6097 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-05-03 17:09:58 +00:00
Johan Danielsson
48efdc7058 add kadm5_s_create_principal_with_key
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6074 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-05-03 16:39:20 +00:00
Johan Danielsson
13959e40fb (kadm5_s_create_principal): create v4 salts for all DES keys
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5941 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-04-13 16:38:03 +00:00
Johan Danielsson
aaae186ab9 merge new-crypto branch
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5332 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-02-11 21:03:59 +00:00
Johan Danielsson
73e43483f6 typo
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4954 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-26 12:06:27 +00:00
Johan Danielsson
b49b2e0971 possibly make DES keys version 4 salted
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4953 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-26 12:05:14 +00:00
Assar Westerlund
24d3b8a48b (kadm5_s_create_principal): add change to log
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4316 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-01-20 22:08:15 +00:00
Johan Danielsson
2a79eba4a3 KEYTYPE_DES3
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4028 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-11-16 10:52:45 +00:00
Johan Danielsson
a57ff31ba5 Get some default values from `default' principal.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3818 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-11-07 01:48:03 +00:00
Johan Danielsson
5eed05ead6 Correct kvno. Return values.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3778 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-11-05 23:20:25 +00:00
Johan Danielsson
6468475655 Use _kadm5_set_keys().
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3725 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-11-01 00:41:08 +00:00
Johan Danielsson
68d77a285f Beginning of a kadm5-library
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3662 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-10-25 06:19:27 +00:00