summaryrefslogtreecommitdiffstats
path: root/src/lib/kdb/kdb_dbm.c
Commit message (Collapse)AuthorAgeFilesLines
* * kdb_dbm.c: Unused file deletedKen Raeburn2005-06-101-1409/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17235 dc483132-0cff-0310-8789-dd5450dbe970
* Don't conditionalize prototypes; delete macros supporting it. (Maybe overdone;Ken Raeburn2001-10-101-4/+4
| | | | | | don't worry about restoring them when importing new versions of code.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13792 dc483132-0cff-0310-8789-dd5450dbe970
* kdb_dbm.c (destroy_file_suffix): Declare as staticEzra Peisach2001-04-251-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13189 dc483132-0cff-0310-8789-dd5450dbe970
* copyright notice updates from 1.1 branchKen Raeburn1999-09-241-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11853 dc483132-0cff-0310-8789-dd5450dbe970
* pull up 3des implementation from the marc-3des branchMarc Horowitz1998-10-301-6/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11001 dc483132-0cff-0310-8789-dd5450dbe970
* * keytab.c: (krb5_ktkdb_get_entry): Incoming principal is constEzra Peisach1997-09-151-2/+2
| | | | | | | | | | | | | | | | * kdb_dbm.c (krb5_dbm_db_get_principal, krb5_dbm_db_delete_principal): Incoming principal is const. * kdb_xdr.c (krb5_dbe_update_mod_princ_data, krb5_encode_princ_dbkey): Incoming principal is const. * kdb_db2.h (krb5_db2_db_get_principal): Change prototype to const principal. * kdb_db2.c (krb5_db2_db_get_principal, krb5_db2_db_delete_principal): The search for principal is const. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10192 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb_dbm.c: Ditch DB_OPENCLOSE conditionals, and fix the realMark Eichin1996-11-131-69/+8
| | | | | | | | | | | | | | | | | | | | problem. Like the policy db, the main db is now opened on first lock and closed on last unlock. Set db_dbm_ctx to NULL after closing it, to help detect dangling references. (krb5_dbm_db_put_principal, krb5_dbm_db_delete_principal): KDBM_STORE can fail (in case of database corruption, for example) *without* causing errno to be set. If errno is zero, use KRB5_KDB_DB_CORRUPT instead. (If it is non-zero, it may still be wrong, but at least something gets reported. This will be properly fixed by ditching KDBM_* altogether, and using the non-lossy db interfaces, so it's a good enough fix for now.) (krb5_dbm_db_rename): grab errno from rename *before* calling krb5_dbm_db_end_update, to avoid "not a typewriter" syndrome. (krb5_dbm_db_unlock): only close on zero refcount. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9400 dc483132-0cff-0310-8789-dd5450dbe970
* update rename comment to agree with code and previous comment inBarry Jaspan1996-10-181-1/+1
| | | | | | | ChangeLog: rename will create the database if it does not already exist, but not fail if it does already exist git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9202 dc483132-0cff-0310-8789-dd5450dbe970
* kdb_dbm.c: Remove vestigal code which was using BERK_DB_DBM define.Theodore Tso1996-08-221-76/+4
| | | | | | | | | Still need to remove kludgey database "switch" code and recode to use the db interface. t_kdb.c: Update t_kdb to use the new libkdb interface. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8966 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb_dbm.c (krb5_dbm_db_rename): rename should not insist thatBarry Jaspan1996-08-121-1/+1
| | | | | | the target database not already exist git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8930 dc483132-0cff-0310-8789-dd5450dbe970
* Remove references to unused non-portable symbolsSam Hartman1996-08-021-20/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8898 dc483132-0cff-0310-8789-dd5450dbe970
* this commit includes all the changes on the OV_9510_INTEGRATION andMarc Horowitz1996-07-221-25/+113
| | | | | | | | | OV_MERGE branches. This includes, but is not limited to, the new openvision admin system, and major changes to gssapi to add functionality, and bring the implementation in line with rfc1964. before committing, the code was built and tested for netbsd and solaris. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8774 dc483132-0cff-0310-8789-dd5450dbe970
* Remove vestigal ODBM supportTheodore Tso1996-05-201-32/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8085 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb_dbm.c: Do not provide prototypes for dbm_error orEzra Peisach1996-05-181-2/+2
| | | | | | | | dbm_clearerr if they are really macros. Required for Ultrix... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8048 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb_dbm.c (krb5_dbm_db_rename): Initialize pointer before useEzra Peisach1996-02-141-1/+2
| | | | | | for case where new db does not exist. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7477 dc483132-0cff-0310-8789-dd5450dbe970
* Several changes to the db rename feature.Richard Basch1996-01-311-19/+25
| | | | | | | | | | Renaming locks the target lock file. If the target lock file doesn't exist, create it. Check the return value of krb5_dbm_db_set_name and set the context accordingly if the target didn't exist. Only unlink the source lock file if one could be computed. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7418 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb_dbm.c (krb5_dbm_db_rename): O_EXCL is meaningless withoutMark Eichin1996-01-301-1/+1
| | | | | | O_CREAT. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7416 dc483132-0cff-0310-8789-dd5450dbe970
* Fixed three problems in the database rename function:Richard Basch1996-01-221-9/+13
| | | | | | | | | | | | | 1. Added a missing call to krb5_dbm_db_end_update to ensure the lock file timestamp is updated. 2. Corrected the test for a valid lock file handle to be >=0 not non-zero. 3. Use the lock file of the target name, since the source will shortly disappear and another process may already be checking for the lock file of the target. (For example, a kdb5_edit db load will use a temporary name and rename the db to the proper name when it is done, and krb5kdc will be testing for the target lock file.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7351 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb_dbm.c : Move the krb5_db_context to include/krb5/kdb_dbc.h.Chris Provenzano1995-12-121-79/+103
| | | | | | | | | | * kdb_dbm.c krb5_dbm_db_set_mkey(), krb5_dbm_db_get_mkey(): Functions for associating a master key (krb5_encrypt_block *) to a krb5_db_context. Currently it associates it to the krb5_context and will be fixed once the krb5_db_context is better defined (Post 1.0). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7201 dc483132-0cff-0310-8789-dd5450dbe970
* Add context serialization support. Fix gcc -Wall complaintsPaul Park1995-08-291-8/+210
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6613 dc483132-0cff-0310-8789-dd5450dbe970
* Fix database update and renamePaul Park1995-08-181-37/+109
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6550 dc483132-0cff-0310-8789-dd5450dbe970
* Fix krb5_dbm_db_end_update() and remove unused codePaul Park1995-08-171-29/+13
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6542 dc483132-0cff-0310-8789-dd5450dbe970
* decrypt_key.c, encrypt_key.c: Only save the salt data if salt type != 0.Chris Provenzano1995-08-161-336/+190
| | | | | | kdb_dbm.c: Rewritten to NOT open/close the db for every transaction. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6537 dc483132-0cff-0310-8789-dd5450dbe970
* first pass attempt at cleaning up some gcc -Wall flamesTom Yu1995-08-051-22/+28
| | | | | | (see ChangeLogs for gory details) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6424 dc483132-0cff-0310-8789-dd5450dbe970
* * decrypt_key.c, encrypt_key.c, kdb_dbm.c, kdb_xdr.c:Chris Provenzano1995-07-271-459/+39
| | | | | | | | Rewritten for new kdb format. * kdb_cpw.c : New password changing routines for new kdb format. * verify_mky.c, t_kdb.c : Use new kdb format. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6328 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb_dbm.c, t_kdb.c: Add prototype for dbm_error and dbm_clearerrTom Yu1995-07-251-0/+12
| | | | | | | | | in case they're not prototyped in the header files. * configure.in: Add test for missing prototypes for dbm_error and dbm_clearerr. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6322 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb_dbm.c (krb5_dbm_db_create): move dirname, pagnameMark Eichin1995-07-211-3/+4
| | | | | | declarations to the top of function, so it compiles... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6320 dc483132-0cff-0310-8789-dd5450dbe970
* Make sure the dbm context is initialized before we startTheodore Tso1995-07-091-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6270 dc483132-0cff-0310-8789-dd5450dbe970
* Add function dispatch for database accessesPaul Park1995-06-301-115/+283
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6208 dc483132-0cff-0310-8789-dd5450dbe970
* Permit a process to have more than one database open at the same timePaul Park1995-06-231-65/+180
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6134 dc483132-0cff-0310-8789-dd5450dbe970
* Use new Berkeley Database code and add testPaul Park1995-05-261-24/+87
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5896 dc483132-0cff-0310-8789-dd5450dbe970
* Don't cast dbm_close() to void, because dbm_close is already voidTheodore Tso1995-03-241-5/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5238 dc483132-0cff-0310-8789-dd5450dbe970
* Avoid <krb5/....> includesJohn Gilmore1995-02-281-8/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5007 dc483132-0cff-0310-8789-dd5450dbe970
* Removed all references to DECLARG and OLDDECLARG.Chris Provenzano1995-01-131-128/+175
| | | | | | Added krb5_context to all krb5_routines git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4808 dc483132-0cff-0310-8789-dd5450dbe970
* Fix obvious typoTheodore Tso1994-11-191-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4705 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb_dbm.c (krb5_dbm_db_unlock): Use krb5_lock_file.Mark Eichin1994-11-181-58/+25
| | | | | | | | (krb5_dbm_db_lock): Same. (Changes from jtkohl@mit.edu.) the rest of [txn 497]. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4674 dc483132-0cff-0310-8789-dd5450dbe970
* Add include config.h for POSIX_FILE_LOCKSTheodore Tso1994-10-241-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4570 dc483132-0cff-0310-8789-dd5450dbe970
* Don't need to define POSIX_FILE_LOCKS; just include config.h insteadTheodore Tso1994-10-241-6/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4553 dc483132-0cff-0310-8789-dd5450dbe970
* Use POSIX_FILE_LOCKS if _POSIX_VERSION is defined in unistd.hTheodore Tso1994-10-141-0/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4510 dc483132-0cff-0310-8789-dd5450dbe970
* Add backwards compatibility for version numbers 1.0 and 2.0 of theTheodore Tso1994-10-041-1/+56
| | | | | | database entry. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4436 dc483132-0cff-0310-8789-dd5450dbe970
* Database records now must be version 2.0 (instead of versions 1.0 orTheodore Tso1994-10-041-2/+2
| | | | | | | 0.0). The structure magic numbers force us to do an incompatible version number change. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4435 dc483132-0cff-0310-8789-dd5450dbe970
* stamp out rcs keywordsMark Eichin1994-08-181-6/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4191 dc483132-0cff-0310-8789-dd5450dbe970
* punt unused varsMark Eichin1994-08-141-1/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4143 dc483132-0cff-0310-8789-dd5450dbe970
* Use POSIX utime() instead of non-posix utimes()Theodore Tso1994-07-151-10/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3979 dc483132-0cff-0310-8789-dd5450dbe970
* Make sure memory is freed on errorsTheodore Tso1993-12-241-41/+49
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3279 dc483132-0cff-0310-8789-dd5450dbe970
* Change use of xfree to krb5_xfree to prevent namespace pollutionTheodore Tso1993-10-151-4/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2670 dc483132-0cff-0310-8789-dd5450dbe970
* Change export warning notice from "is assumed to require an export license"Theodore Tso1993-09-011-2/+2
| | | | | | to "may require..." git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2638 dc483132-0cff-0310-8789-dd5450dbe970
* Fixed locking #includesTheodore Tso1993-02-261-14/+55
| | | | | | | | | Changed name for default KDB file name Changed format of KDB to have a version number, for compatibility in the future (and yet still be compatible for this change). Fixed typo in alternative salt encoding code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2503 dc483132-0cff-0310-8789-dd5450dbe970
* Changes to store the alternate key/salt information if presentTheodore Tso1992-09-291-55/+159
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2426 dc483132-0cff-0310-8789-dd5450dbe970
* Fix cast of dbm_open return valueJohn Carr1992-03-251-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2265 dc483132-0cff-0310-8789-dd5450dbe970