#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
#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"
lclpath = dbpath;
}
else if (strncmp(arg, "-auditlog", arglen) == 0) {
- int tempfd, flags;
- FILE *auditout;
- char oldName[MAXPATHLEN];
char *fileName = argv[++a];
-#ifndef AFS_NT40_ENV
- struct stat statbuf;
-
- if ((lstat(fileName, &statbuf) == 0)
- && (S_ISFIFO(statbuf.st_mode))) {
- flags = O_WRONLY | O_NONBLOCK;
- } else
-#endif
- {
- strcpy(oldName, fileName);
- strcat(oldName, ".old");
- renamefile(fileName, oldName);
- flags = O_WRONLY | O_TRUNC | O_CREAT;
- }
- tempfd = open(fileName, flags, 0666);
- if (tempfd > -1) {
- auditout = fdopen(tempfd, "a");
- if (auditout) {
- osi_audit_file(auditout);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
+ osi_audit_file(fileName);
} else if (strcmp(arg, "-localfiles") == 0)
lclpath = argv[++a];
else if (strcmp(arg, "-servers") == 0)
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
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;
ADDRSPERSITE, reason,
AFSDIR_SERVER_NETINFO_FILEPATH,
AFSDIR_SERVER_NETRESTRICT_FILEPATH);
- } else {
+ } else
+ {
ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
}
if (ccode == 1) {
&clones, dbpath, &KA_dbase);
if (code) {
- com_err(whoami, code, "Ubik init failed");
+ afs_com_err(whoami, code, "Ubik init failed");
exit(2);
}
}
ViceLog(0, ("Starting to process AuthServer requests\n"));
- rx_ServerProc(); /* donate this LWP */
+ rx_ServerProc(NULL); /* donate this LWP */
return 0;
}