netrestrict-netinfo-20081129
[openafs.git] / src / kauth / kaserver.c
index c4fc3cf..9c22ba2 100644 (file)
@@ -26,13 +26,7 @@ RCSID
 #include "kalog.h"             /* for OpenLog() */
 #include <time.h>
 #include <stdio.h>
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -47,6 +41,7 @@ RCSID
 #include <afs/cellconfig.h>
 #include <lock.h>
 #include <afs/afsutil.h>
+#include <afs/com_err.h>
 #include <ubik.h>
 #include <sys/stat.h>
 #include "kauth.h"
@@ -330,7 +325,7 @@ main(argc, argv)
     if (!KA_conf) {
        code = KANOCELLS;
       abort:
-       com_err(whoami, code, "Failed getting cell info");
+       afs_com_err(whoami, code, "Failed getting cell info");
        exit(1);
     }
 #ifdef        AUTH_DBM_LOG
@@ -343,12 +338,20 @@ main(argc, argv)
     OpenLog(AFSDIR_SERVER_KALOG_FILEPATH);
     SetupLogSignals();
 #endif
+
+    fprintf(stderr, "%s: WARNING: kaserver is deprecated due to its weak security "
+           "properties.  Migrating to a Kerberos 5 KDC is advised.  "
+           "http://www.openafs.org/no-more-des.html\n", whoami);
+    ViceLog(0, ("WARNING: kaserver is deprecated due to its weak security properties.  "
+           "Migrating to a Kerberos 5 KDC is advised.  "
+           "http://www.openafs.org/no-more-des.html\n"));
+
     code =
        afsconf_GetExtendedCellInfo(KA_conf, cell, AFSCONF_KAUTHSERVICE,
                                    &cellinfo, &clones);
     if (servers) {
        if (code = ubik_ParseServerList(argc, argv, &myHost, serverList)) {
-           com_err(whoami, code, "Couldn't parse server list");
+           afs_com_err(whoami, code, "Couldn't parse server list");
            exit(1);
        }
        cellinfo.hostAddr[0].sin_addr.s_addr = myHost;
@@ -387,7 +390,6 @@ main(argc, argv)
 
     if (rxBind) {
        afs_int32 ccode;
-#ifndef AFS_NT40_ENV
         if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || 
             AFSDIR_SERVER_NETINFO_FILEPATH) {
             char reason[1024];
@@ -396,7 +398,6 @@ main(argc, argv)
                                            AFSDIR_SERVER_NETINFO_FILEPATH,
                                            AFSDIR_SERVER_NETRESTRICT_FILEPATH);
         } else 
-#endif 
        {
             ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
         }
@@ -416,7 +417,7 @@ main(argc, argv)
                                  &clones, dbpath, &KA_dbase);
 
     if (code) {
-       com_err(whoami, code, "Ubik init failed");
+       afs_com_err(whoami, code, "Ubik init failed");
        exit(2);
     }
 
@@ -488,6 +489,6 @@ main(argc, argv)
     }
 
     ViceLog(0, ("Starting to process AuthServer requests\n"));
-    rx_ServerProc();           /* donate this LWP */
+    rx_ServerProc(NULL);               /* donate this LWP */
     return 0;
 }