Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src Update from trunk:



details:   https://anonhg.NetBSD.org/src/rev/7855b6d4c199
branches:  netbsd-1-5
changeset: 488916:7855b6d4c199
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Aug 06 21:11:05 2000 +0000

description:
Update from trunk:
Cause the kdc to write a pidfile in /var/run/kdc.pid and to
detach from the tty by default.  Add a [-D | --no-detach]
option to restore the old behavior (which is useful for
debugging).

diffstat:

 crypto/dist/heimdal/kdc/config.c   |  4 +++-
 crypto/dist/heimdal/kdc/kdc.8      |  8 +++++++-
 crypto/dist/heimdal/kdc/kdc_locl.h |  3 ++-
 crypto/dist/heimdal/kdc/main.c     |  7 ++++++-
 libexec/kdc/Makefile               |  5 +++--
 5 files changed, 21 insertions(+), 6 deletions(-)

diffs (120 lines):

diff -r 9ba3d4b7675c -r 7855b6d4c199 crypto/dist/heimdal/kdc/config.c
--- a/crypto/dist/heimdal/kdc/config.c  Sun Aug 06 21:00:33 2000 +0000
+++ b/crypto/dist/heimdal/kdc/config.c  Sun Aug 06 21:11:05 2000 +0000
@@ -35,7 +35,7 @@
 #include <getarg.h>
 #include <parse_bytes.h>
 
-RCSID("$Id: config.c,v 1.1.1.1 2000/06/16 18:31:37 thorpej Exp $");
+RCSID("$Id: config.c,v 1.1.1.1.2.1 2000/08/06 21:11:07 thorpej Exp $");
 
 static char *config_file;      /* location of kdc config file */
 
@@ -54,6 +54,7 @@
 char *port_str;
 
 int enable_http = -1;
+int no_detach;
 krb5_boolean encode_as_rep_as_tgs_rep; /* bug compatibility */
 
 krb5_boolean check_ticket_addresses;
@@ -93,6 +94,7 @@
     },
 #endif
     { "enable-http", 'H', arg_flag, &enable_http, "turn on HTTP support" },
+    { "no-detach",   'D', arg_flag, &no_detach, "do not detach from tty" },
 #ifdef KRB4
     { 
        "v4-realm",     'r',    arg_string, &v4_realm, 
diff -r 9ba3d4b7675c -r 7855b6d4c199 crypto/dist/heimdal/kdc/kdc.8
--- a/crypto/dist/heimdal/kdc/kdc.8     Sun Aug 06 21:00:33 2000 +0000
+++ b/crypto/dist/heimdal/kdc/kdc.8     Sun Aug 06 21:11:05 2000 +0000
@@ -1,4 +1,4 @@
-.\" $Id: kdc.8,v 1.1.1.1 2000/06/16 18:31:38 thorpej Exp $
+.\" $Id: kdc.8,v 1.1.1.1.2.1 2000/08/06 21:11:07 thorpej Exp $
 .\"
 .Dd July 27, 1997
 .Dt KDC 8
@@ -15,6 +15,7 @@
 .Op Fl p | Fl -no-require-preauth
 .Op Fl -max-request= Ns Ar size
 .Op Fl H | Fl -enable-http
+.Op Fl D | Fl -no-detach
 .Oo Fl r Ar string \*(Ba Xo
 .Fl -v4-realm= Ns Ar string Oc
 .Xc
@@ -61,6 +62,11 @@
 .Xc
 Makes the kdc listen on port 80 and handle requests encapsulated in HTTP.
 .It Xo
+.Fl D Ns ,
+.Fl -no-detach
+.Xc
+Makes the kdc not detach from the tty.  Useful for debugging.
+.It Xo
 .Fl K Ns ,
 .Fl -no-kaserver
 .Xc
diff -r 9ba3d4b7675c -r 7855b6d4c199 crypto/dist/heimdal/kdc/kdc_locl.h
--- a/crypto/dist/heimdal/kdc/kdc_locl.h        Sun Aug 06 21:00:33 2000 +0000
+++ b/crypto/dist/heimdal/kdc/kdc_locl.h        Sun Aug 06 21:11:05 2000 +0000
@@ -32,7 +32,7 @@
  */
 
 /* 
- * $Id: kdc_locl.h,v 1.1.1.1 2000/06/16 18:31:38 thorpej Exp $ 
+ * $Id: kdc_locl.h,v 1.1.1.1.2.1 2000/08/06 21:11:07 thorpej Exp $ 
  */
 
 #ifndef __KDC_LOCL_H__
@@ -58,6 +58,7 @@
 extern krb5_addresses explicit_addresses;
 
 extern int enable_http;
+extern int no_detach;
 extern krb5_boolean encode_as_rep_as_tgs_rep;
 extern krb5_boolean check_ticket_addresses;
 extern krb5_boolean allow_null_ticket_addresses;
diff -r 9ba3d4b7675c -r 7855b6d4c199 crypto/dist/heimdal/kdc/main.c
--- a/crypto/dist/heimdal/kdc/main.c    Sun Aug 06 21:00:33 2000 +0000
+++ b/crypto/dist/heimdal/kdc/main.c    Sun Aug 06 21:11:05 2000 +0000
@@ -33,7 +33,9 @@
 
 #include "kdc_locl.h"
 
-RCSID("$Id: main.c,v 1.1.1.1 2000/06/16 18:31:38 thorpej Exp $");
+#include <util.h>
+
+RCSID("$Id: main.c,v 1.1.1.1.2.1 2000/08/06 21:11:07 thorpej Exp $");
 
 sig_atomic_t exit_flag = 0;
 krb5_context context;
@@ -94,6 +96,9 @@
     signal(SIGINT, sigterm);
     signal(SIGTERM, sigterm);
 #endif
+    if (no_detach == 0)
+       daemon(0, 0);
+    pidfile(NULL);
     loop();
     krb5_free_context(context);
     return 0;
diff -r 9ba3d4b7675c -r 7855b6d4c199 libexec/kdc/Makefile
--- a/libexec/kdc/Makefile      Sun Aug 06 21:00:33 2000 +0000
+++ b/libexec/kdc/Makefile      Sun Aug 06 21:11:05 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2000/06/16 23:41:41 thorpej Exp $
+# $NetBSD: Makefile,v 1.2.2.1 2000/08/06 21:11:05 thorpej Exp $
 DIST=          ${.CURDIR}/../../crypto/dist
 .PATH: ${DIST}/heimdal/kdc
 
@@ -40,7 +40,8 @@
        -lasn1                                  \
        -lcom_err                               \
        -lroken                                 \
-       -lcrypt
+       -lcrypt                                 \
+       -lutil
 
 MAN=   kdc.8
 



Home | Main Index | Thread Index | Old Index