Sdiff kdb5_util.c
  1 /*
  2  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  3  * Use is subject to license terms.
  4  */
  5 
  6 #pragma ident   "@(#)kdb5_util.c        1.10    04/09/08 SMI" 
  7 
  8 /*
  9  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
 10  *
 11  *      Openvision retains the copyright to derivative works of
 12  *      this source code.  Do *NOT* create a derivative of this
 13  *      source code before consulting with your legal department.
 14  *      Do *NOT* integrate *ANY* of this source code into another
 15  *      product before consulting with your legal department.
 16  *
 17  *      For further information, read the top-level Openvision
 18  *      copyright which is contained in the top-level MIT Kerberos
 19  *      copyright.
 20  *
 21  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
 22  *
 23  */
 24 
 25 
 26 /*


279 exit(1); 280 } 281 /* 282 * Dump creates files which should not be world-readable. It is 283 * easiest to do a single umask call here. 284 */ 285 (void) umask(077); 286 287 (void) memset(&master_key, 0, sizeof (krb5_keyblock)); 288 289 if ((global_params.enctype != ENCTYPE_UNKNOWN) && 290 (!valid_enctype(global_params.enctype))) { 291 com_err(argv[0], KRB5_PROG_KEYTYPE_NOSUPP, 292 gettext("while setting up enctype %d"), global_params.enctype); 293 } 294 295 cmd = cmd_lookup(cmd_argv[0]); 296 if (cmd->opendb && open_db_and_mkey()) 297 return (exit_status); 298 299 (*cmd->func)(cmd_argc, cmd_argv); 300 301 if(close_policy_db) { 302 (void) osa_adb_close_policy(policy_db); 303 } 304 kadm5_free_config_params(util_context, &global_params); 305 krb5_free_context(util_context); 306 return (exit_status); 307 } 308 309 #if 0 310 /* 311 * This function is no longer used in kdb5_util (and it would no 312 * longer work, anyway). 313 */ 314 void 315 set_dbname(argc, argv) 316 int argc; 317 char *argv[]; 318 {
  1 /*
  2  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  3  * Use is subject to license terms.
  4  */
  5 
  6 #pragma ident   "@(#)kdb5_util.c        1.9     04/05/04 SMI" 
  7 
  8 /*
  9  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
 10  *
 11  *      Openvision retains the copyright to derivative works of
 12  *      this source code.  Do *NOT* create a derivative of this
 13  *      source code before consulting with your legal department.
 14  *      Do *NOT* integrate *ANY* of this source code into another
 15  *      product before consulting with your legal department.
 16  *
 17  *      For further information, read the top-level Openvision
 18  *      copyright which is contained in the top-level MIT Kerberos
 19  *      copyright.
 20  *
 21  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
 22  *
 23  */
 24 
 25 
 26 /*


279 exit(1); 280 } 281 /* 282 * Dump creates files which should not be world-readable. It is 283 * easiest to do a single umask call here. 284 */ 285 (void) umask(077); 286 287 (void) memset(&master_key, 0, sizeof (krb5_keyblock)); 288 289 if ((global_params.enctype != ENCTYPE_UNKNOWN) && 290 (!valid_enctype(global_params.enctype))) { 291 com_err(argv[0], KRB5_PROG_KEYTYPE_NOSUPP, 292 gettext("while setting up enctype %d"), global_params.enctype); 293 } 294 295 cmd = cmd_lookup(cmd_argv[0]); 296 if (cmd->opendb && open_db_and_mkey()) 297 return (exit_status); 298 299 if (global_params.iprop_enabled == TRUE) 300 ulog_set_role(util_context, IPROP_MASTER); 301 else 302 ulog_set_role(util_context, IPROP_NULL); 303 304 (*cmd->func)(cmd_argc, cmd_argv); 305 306 if(close_policy_db) { 307 (void) osa_adb_close_policy(policy_db); 308 } 309 kadm5_free_config_params(util_context, &global_params); 310 krb5_free_context(util_context); 311 return (exit_status); 312 } 313 314 #if 0 315 /* 316 * This function is no longer used in kdb5_util (and it would no 317 * longer work, anyway). 318 */ 319 void 320 set_dbname(argc, argv) 321 int argc; 322 char *argv[]; 323 {