From be28f2ccde9d1bfdd4adc3ed334b68fa4ca1f1a0 Mon Sep 17 00:00:00 2001 From: Paul Park Date: Fri, 30 Jun 1995 20:16:55 +0000 Subject: [PATCH] Fix initialization and terminal disassociation broken by previous rev git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6207 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/v5server/srv_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/kadmin/v5server/srv_main.c b/src/kadmin/v5server/srv_main.c index 4cb1a3e71..866e064fe 100644 --- a/src/kadmin/v5server/srv_main.c +++ b/src/kadmin/v5server/srv_main.c @@ -204,19 +204,13 @@ main(argc, argv) usage(argv[0]); return(1); } - krb5_init_context(&kcontext); - krb5_init_ets(kcontext); - krb5_klog_init(kcontext, "admin_server", programname, 1); - error = key_init(kcontext, debug_level, enc_type, key_type, - master_key_name, manual_entry, db_file, db_realm, - keytab_name); #ifndef DEBUG /* * If we're not debugging and we didn't specify -n, then detach from our * controlling terminal and exit. */ - if (!nofork && daemon(0, 0)) { + if (!nofork && daemon(0, (manual_entry != 0))) { fprintf(stderr, daemon_err, argv[0]); perror(argv[0]); return(2); @@ -235,6 +229,9 @@ main(argc, argv) #else /* DEBUG */ programname = argv[0]; #endif /* DEBUG */ + krb5_init_context(&kcontext); + krb5_init_ets(kcontext); + krb5_klog_init(kcontext, "admin_server", programname, 1); if ((signal_number = #if POSIX_SETJMP @@ -274,6 +271,9 @@ main(argc, argv) /* * Initialize our modules. */ + error = key_init(kcontext, debug_level, enc_type, key_type, + master_key_name, manual_entry, db_file, db_realm, + keytab_name); if (!error) { error = acl_init(kcontext, debug_level, acl_file); if (!error) { -- 2.26.2