summaryrefslogtreecommitdiffstats
path: root/src/kadmin/dbutil/kdb5_create.c
Commit message (Collapse)AuthorAgeFilesLines
* Include autoconf.h before system headersGreg Hudson2014-07-081-1/+0
| | | | | | | | | Include autoconf.h (either directly or via proxy) before system headers, so that feature test macros defined there can affect the system namespace. Where include order was changed, eliminate some redundant or unnecessary includes. ticket: 7961
* Simplify ulog_mapGreg Hudson2014-02-201-3/+3
| | | | | | | | | | | | | | | | | | | | Get rid of the caller parameter. The kproplog semantics (without -R) for mapping the ulog are simple and almost completely different from other users of the ulog, so implement them as a static helper in kproplog. With hierarchical iprop, kpropd will need the same semantics as FKCOMMAND and FKADMIND, which were already identical. Get rid of the db_args parameter, since ulog_map no longer opens the database after #7552. Remove an inoperative lseek() call when creating a new ulog file. Rename ulog_filesize to filesize and compute it from scratch each time we use it, for easier analysis. If kdb_hmagic is zero, init the ulog header but don't skip the rest of the function; it's possible that we need to expand the ulog file. Remove an unneeded conditional before calling extend_file_to for an existing ulog. ticket: 7855
* Lock around more ulog operationsGreg Hudson2014-02-201-1/+6
| | | | | | | | | | | | | | | Always lock the ulog when accessing it. We can currently get away with some laxness on iprop slaves because they are mostly synchronous, but hierarchical iprop will allow master and slave operations to take place concurrently, requiring more strict locking. Add new functions ulog_get_last and ulog_set_last, which access the ulog header with locking, and use them in kdb5_util and kpropd. Add locking to ulog_replay and ulog_init_header. ulog_lock and ulog_sync_header are no longer used outside of kdb_log.c after these changes, so make them static functions and remove the ulog_ prefix. Add an unlock_ulog function for clarity.
* Use retval, not errno, when stashing master keysBen Kaduk2013-11-041-1/+1
| | | | | | The krb5_db_store_master_key{,_list} functions return a krb5_error_code, and do not necessarily set errno on failure. Use the correct variable while reporting errors with com_err().
* Fix various warningsGreg Hudson2013-06-071-2/+1
|
* Fix iprop log reinitializationGreg Hudson2013-01-221-6/+1
| | | | | | | | | | | | | | | | If the master iprop log is reinitialized to serial number 0, slaves will need to take a full dump--but after that happens, we need to know whether the slave has taken that full dump, we we don't offering full dumps indefinitely. So, record a timestamp in kdb_last_time when we reinitialize the log header, and compare the slave timestamp to kdb_last_time whenever it has the current serial number, even if it's 0. Test this by performing a propagation with sno 0 in t_iprop.py and detecting whether kpropd gets a second UPDATE_FULL_RESYNC_NEEDED response from kadmind. ticket: 7550 (new)
* Mark up strings for translationGreg Hudson2011-06-101-19/+22
| | | | | | ticket: 6918 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24961 dc483132-0cff-0310-8789-dd5450dbe970
* Adjust most C source files to match the new standards for copyrightGreg Hudson2011-03-091-8/+3
| | | | | | and license comments. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24695 dc483132-0cff-0310-8789-dd5450dbe970
* Remove count parameters from get_principal, put_principal,Greg Hudson2010-07-061-24/+26
| | | | | | | | | | | free_principal, delete_principal, and get_policy. Make get_principal allocate the DB entry container. Fold krb5_db_get_principal_ext into krb5_db_get_principal. ticket: 6749 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24175 dc483132-0cff-0310-8789-dd5450dbe970
* Rename krb5_dbekd_encrypt_key_data and krb5_dbekd_decrypt_key_data toGreg Hudson2010-07-021-9/+6
| | | | | | | | | just use the krb5_dbe prefix. ticket: 6749 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24164 dc483132-0cff-0310-8789-dd5450dbe970
* Reindent after making fixes for emacs-23Tom Yu2009-11-031-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23123 dc483132-0cff-0310-8789-dd5450dbe970
* make mark-cstyleTom Yu2009-10-311-193/+194
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* Add a new '-W' option to kadmind and kdb5_util create to allow readingTom Yu2009-07-101-2/+6
| | | | | | | | | | | weak random numbers on startup, to avoid long delays in testing situations. Use only for testing. Update testing scripts accordingly. ticket: 1233 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22434 dc483132-0cff-0310-8789-dd5450dbe970
* Remove unnecessary pointer casts in args to free,memcpy,memset,memchr except ↵Ken Raeburn2009-02-021-3/+3
| | | | | | unicode, windows code git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21875 dc483132-0cff-0310-8789-dd5450dbe970
* Master Key Migration ProjectWill Fiveash2009-01-301-2/+23
| | | | | | | | | | | | | | | Commit for the Master Key Migration Project. http://k5wiki.kerberos.org/wiki/Projects/Master_Key_Migration This commit provides the ability to add a new master key (with an enctype differing from the current master key) to the master key principal and stash file and then migrate the encryption of existing principals long term keys to use the new master key. In addition deletion of master keys is provided. ticket: 6354 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21844 dc483132-0cff-0310-8789-dd5450dbe970
* Fix up warning of suggested parens in assignment in conditionalEzra Peisach2008-12-291-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21634 dc483132-0cff-0310-8789-dd5450dbe970
* a stash file is not a keytabWill Fiveash2008-08-151-1/+18
| | | | | | | | | Note, this is the commit for the associated Krb Consortium project: Projects/Masterkey Keytab Stash ticket: 194 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20661 dc483132-0cff-0310-8789-dd5450dbe970
* Apply patch from Mark Phalan to correctly use progname instead ofTom Yu2008-07-171-14/+11
| | | | | | | | | | argv[0]. ticket: 6030 tags: pullup target_version: 1.6.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20532 dc483132-0cff-0310-8789-dd5450dbe970
* Merge from branch sun-ipropKen Raeburn2008-06-241-1/+38
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20465 dc483132-0cff-0310-8789-dd5450dbe970
* Patch from Will Fiveash for "kdb5_util create" support in LDAP, modified toKen Raeburn2006-09-251-0/+4
| | | | | | | drop separate port-number spec so it'll build with current sources. Not tested because of a bug in the recent Novell patch. :-( git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18616 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb5_util.c (add_db_arg): New function.Ken Raeburn2006-06-291-12/+4
| | | | | | | | | (main): Use it. * kdb5_util.h (add_db_arg): Declare it. * kdb5_create.c (kdb5_create): Use it. * dump.c (load_db): Use it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18276 dc483132-0cff-0310-8789-dd5450dbe970
* Instead of arbitrary division of headers into include and include/krb5, withKen Raeburn2006-03-111-2/+2
| | | | | | | | | | | | include directives sometimes using krb5/foo.h and sometimes using foo.h, and -I options always given for both directories in both source and build trees, push include/krb5/* up a level and drop the krb5 directory (except, for the moment, the change log). Updated #include directives, -I options, and dependencies accordingly, and deleted one or two bits of old, unused code that was noticed in the process. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17730 dc483132-0cff-0310-8789-dd5450dbe970
* Novell Database Abstraction Layer merge.Ken Raeburn2005-06-211-35/+31
| | | | | | Will probably break things. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17258 dc483132-0cff-0310-8789-dd5450dbe970
* Implement code to get random data from /dev/{random,urandom}. ForSam Hartman2002-01-081-1/+8
| | | | | | | init_context use /dev/urandom; for database creation use /dev/random if it exists. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14087 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
* * kdb5_create.c: Include <krb5/adm_proto.h> forEzra Peisach2001-06-201-0/+1
| | | | | | krb5_keysalt_iterate() prototype. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13413 dc483132-0cff-0310-8789-dd5450dbe970
* Fixed a bunch of typosMitchell Berger2001-06-201-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13398 dc483132-0cff-0310-8789-dd5450dbe970
* * dumpv4.c: Pass C_Block * to des_read_password() as per prototypeEzra Peisach2001-06-081-0/+1
| | | | | | | | | | | | * loadv4.c: Include k5-int.h before des.h for des_read_password prototype. Pass C_Block * to des_read_password() as per prototype. * kdb5_util.h: Add prototype for usage. * kdb5_create.c, kdb5_destroy.c, kdb5_stash.c: Include kdb5_util.h for usage() prototype. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13317 dc483132-0cff-0310-8789-dd5450dbe970
* * kadm5_create.c: Add prototype for staticEzra Peisach2001-06-041-9/+12
| | | | | | | | | | add_admin_princs(). Cleanup calling of add_admin_princs() to be consistant with prototype. * kdb5_create.c, kdb5_stash.c, kdb5_destroy.c: Cleanup assignments in conditionals. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13267 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb5_create.c (kdb5_create): Argument to krb5_read_passwordEzra Peisach2000-10-171-1/+1
| | | | | | changed to unsigned int. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12791 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-51/+46
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11001 dc483132-0cff-0310-8789-dd5450dbe970
* POSIX states that getopt returns -1 when it is done parsing options,Theodore Tso1998-05-061-1/+1
| | | | | | not EOF. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10550 dc483132-0cff-0310-8789-dd5450dbe970
* * loadv4.c:Tom Yu1997-07-251-1/+5
| | | | | | | | * kdb5_create.c: * kdb5_destroy.c: * dump.c: Update to new kdb API. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10135 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb5_util.c: make mkey_password non-staticBarry Jaspan1996-08-121-9/+2
| | | | | | * kdb5_create.c: use global mkey_password git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8925 dc483132-0cff-0310-8789-dd5450dbe970
* * all files: reworked for non-ss usage; kdb5_util_ct.ct andBarry Jaspan1996-08-051-13/+0
| | | | | | ss_wrapper.c are now obsolete git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8907 dc483132-0cff-0310-8789-dd5450dbe970
* * dump.c, kadm5_create.c, kdb5_create.c: create policy databaseBarry Jaspan1996-08-011-3/+2
| | | | | | and kadm5 principals when loading a databas git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8891 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb5_create.c (kdb5_create): Ignore (expected) failure inEzra Peisach1996-07-271-1/+4
| | | | | | | open_db_and_mkey when creating database in returning exit status. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8851 dc483132-0cff-0310-8789-dd5450dbe970
* this commit includes all the changes on the OV_9510_INTEGRATION andMarc Horowitz1996-07-221-0/+449
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