Roland C. Dowdeswell
2656659fc2
Fix a typo in a comment.
2012-05-21 17:12:16 +01:00
Roland C. Dowdeswell
1f63d6e4dc
Fix locking issues in DB1 HDB backend.
...
Multiple concurrent writers would cause the HDB to become corrupted
as the locking was not sufficient to prevent these sorts of issues
from occurring. We have changed the locking to obtain the appropriate
kind of lock on database open and to hold that lock until the
database closes. We need to do this as Berkeley DB 1.85 will cache
information from the database in memory and if if this information
is updated without our knowledge then our later writes will corrupt
the database. We speculate that there would be issues with a single
writer and reader but did not reproduce them.
2012-05-18 12:39:08 +01:00
Nicolas Williams
95262936c7
s/assert/heim_assert/ and remove dead code
2011-07-24 11:07:27 -05:00
Nicolas Williams
abd94953e2
Fixes to lock nesting code.
2011-07-22 16:04:52 -05:00
Nicolas Williams
58d72035f1
Added kadm5_lock() and unlock.
2011-07-22 16:04:52 -05:00
Love Hornquist Astrand
6c6726d76c
drop hdb_fetch
2010-11-28 11:46:46 -08:00
Love Hornquist Astrand
ee8c2e45b4
use _hdb_fetch_kvno
2010-11-28 11:20:31 -08:00
Love Hörnquist Åstrand
5a9dd54e95
drop RCSID
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25319 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-07-05 05:09:16 +00:00
Love Hörnquist Åstrand
6aa38c372c
Push enterprise support into the bdblayer.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25318 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-07-05 05:09:04 +00:00
Love Hörnquist Åstrand
54b5beeb98
set hdb_capability_flags = 0
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25311 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-07-05 05:07:41 +00:00
Love Hörnquist Åstrand
cdc2b37670
switch to krb5_clear_error_message
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23913 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-14 02:56:07 +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
7fcd266fdd
use krb5_set_error_message
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23316 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 04:32:32 +00:00
Love Hörnquist Åstrand
7aaf3af6e4
Be better at setting and clearing error string.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20215 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-02-09 21:59:53 +00:00
Love Hörnquist Åstrand
ee9b01aa50
By using full function calling conversion (*func) we avoid problem
...
when close(fd) is overridden using a macro.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18079 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-12 18:12:37 +00:00
Love Hörnquist Åstrand
91026474ad
memset hdb_entry_ex before use
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16395 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-12-13 11:54:10 +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
0fa794702c
(hdb_db_create): use calloc to callocate memory
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16304 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-11-28 23:33:24 +00:00
Love Hörnquist Åstrand
c5ac9b9af6
(DB_open): in case of error, close database
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15508 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-23 13:34:17 +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
334c7ffa33
merge of DB-NEW
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10453 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-09 08:41:49 +00:00
Assar Westerlund
c7562eda65
add some more error strings
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10338 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-07-13 06:30:42 +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
f498ac3c40
add berkeley db3 interface. contributed by Derrick J Brashear <shadow@dementia.org>
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8312 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-06-05 01:08:47 +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
Johan Danielsson
f604b5db10
add flags to DB_seq, DB_firstkey, and DB_nextkey
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6089 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-05-03 16:51:51 +00:00
Assar Westerlund
2974b8e4cc
(DB_destroy): clear master key
...
(DB_open): check malloc
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5760 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-03-25 03:38:56 +00:00
Johan Danielsson
0b5e5caf89
(DB_open): try to open database w/o .db extension
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5397 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-02-20 15:40:16 +00:00
Johan Danielsson
20c97f7f5e
(DB_open): add test for database format
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5394 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-02-20 15:11:27 +00:00
Assar Westerlund
aebdc83e68
(DB_seq): unseal key
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5298 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-01-30 18:21:42 +00:00
Assar Westerlund
2032781fa8
rename delete -> remove
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5241 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-11-23 11:54:22 +00:00
Johan Danielsson
ea12bdc9e8
Remove unused stuff.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3966 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-11-12 00:47:52 +00:00
Assar Westerlund
593cda47a5
implement new interface
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3626 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-10-16 04:13:04 +00:00
Johan Danielsson
a2a09b5eab
Add _del routine, use common fetch/store/delete.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3292 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-30 19:29:05 +00:00
Assar Westerlund
601d7c81e1
(DB__get): fix parameters in call to `krb5_data_copy'
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3235 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-28 22:10:52 +00:00
Assar Westerlund
3a8615c2ad
(DB_seq): check for valid hdb_entries
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3214 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-28 01:26:09 +00:00
Johan Danielsson
5c5e6599d9
Add _put.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3171 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-26 22:29:08 +00:00
Johan Danielsson
5af8445972
Free name in close.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2979 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-14 22:18:04 +00:00
Johan Danielsson
f813822cdd
+DB_rename
...
.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2861 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-09 20:34:15 +00:00
Johan Danielsson
be512825c6
Add database locking.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2670 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-01 14:53:18 +00:00
Assar Westerlund
85f5f471fb
never clear about when to free
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2620 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-24 11:31:10 +00:00
Assar Westerlund
06a5eb07ff
free data
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2566 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-23 23:52:51 +00:00
Johan Danielsson
cbdddcbe0b
Allocate principal.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2518 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-23 02:07:53 +00:00
Johan Danielsson
5a32a5c8e7
Add copyright notice.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2389 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-16 21:40:05 +00:00
Johan Danielsson
86d922a0fc
Don't free, don't malloc (by a paraphrased Yoshigasaki-sensei).
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2243 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-13 03:11:00 +00:00
Assar Westerlund
ca8e6f17cb
removed incorrect free
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1852 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-06-07 18:59:25 +00:00
Johan Danielsson
f8aaed35c5
Merge fetch and store.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1818 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-06-01 21:31:57 +00:00
Assar Westerlund
c8c417e265
remove extra `krb5_data_free'
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1813 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-06-01 21:21:26 +00:00