+2001-06-20 Mitchell Berger <mitchb@mit.edu>
+
+ * krb524d.c: Call krb5_klog_init before the first point where the
+ klog facility may be used, delete ifdef'd out code to make that
+ call from later in the file, conditionalize kadm5_destroy on the
+ handle being non-null, and correct an indentation error.
+
2001-06-19 Ken Raeburn <raeburn@mit.edu>
* sendmsg.c (krb524_sendto_kdc): Use new locate_server interface.
char *whoami;
int signalled = 0;
static int debug = 0;
-void *handle;
+void *handle = NULL;
int use_keytab, use_master;
char *keytab = NULL;
signal(SIGHUP, SIG_IGN);
signal(SIGTERM, request_exit);
+ krb5_klog_init(context, "krb524d", whoami, !nofork);
+
if (use_keytab)
init_keytab(context);
if (use_master)
com_err(whoami, errno, "while detaching from tty");
cleanup_and_exit(1, context);
}
-#if 0
- if (!nofork)
- krb5_klog_init(context, "krb524d", argv[0], !nofork);
-#endif
while (1) {
FD_ZERO(&rfds);
int ret;
krb5_context context;
{
- if (use_master) {
+ if (use_master && handle) {
(void) kadm5_destroy(handle);
}
if (use_keytab) krb5_kt_close(context, kt);
ret = errno;
if (debug)
printf("reply written\n");
-/* If we have keys to clean up, do so.*/
+ /* If we have keys to clean up, do so.*/
if (v5_service_key.contents)
krb5_free_keyblock_contents(context, &v5_service_key);
if (v4_service_key.contents)