int pr_realmNameLen;
char *pr_realmName;
+int debuglevel = 0;
int restricted = 0;
int rxMaxMTU = -1;
int rxBind = 0;
if ((strncmp(arg, "-database", alen) == 0)
|| (strncmp(arg, "-db", alen) == 0)) {
pr_dbaseName = argv[++a]; /* specify a database */
+ } else if (strcmp(argv[a], "-d") == 0) {
+ if ((a + 1) >= argc) {
+ fprintf(stderr, "missing argument for -d\n");
+ return -1;
+ }
+ debuglevel = atoi(argv[++a]);
+ LogLevel = debuglevel;
} else if (strncmp(arg, "-p", alen) == 0) {
lwps = atoi(argv[++a]);
if (lwps > 16) { /* maximum of 16 */
}
#endif
else if (strncmp(arg, "-auditlog", alen) == 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);
- osi_audit(PTS_StartEvent, 0, AUD_END);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
- } else
- printf("Warning: auditlog %s not writable, ignored.\n", fileName);
+ osi_audit_file(fileName);
+ osi_audit(PTS_StartEvent, 0, AUD_END);
}
else if (!strncmp(arg, "-rxmaxmtu", alen)) {
if ((a + 1) >= argc) {
#ifndef AFS_NT40_ENV
printf("Usage: ptserver [-database <db path>] "
"[-auditlog <log path>] "
- "[-syslog[=FACILITY]] "
+ "[-syslog[=FACILITY]] [-d <debug level>] "
"[-p <number of processes>] [-rebuild] "
"[-groupdepth <depth>] "
"[-restricted] [-rxmaxmtu <bytes>] [-rxbind] "
"[-help]\n");
#else /* AFS_NT40_ENV */
printf("Usage: ptserver [-database <db path>] "
- "[-auditlog <log path>] "
+ "[-auditlog <log path>] [-d <debug level>] "
"[-p <number of processes>] [-rebuild] [-rxbind] "
"[-allow-dotted-principals] "
"[-default_access default_user_access default_group_access] "
#else
#ifndef AFS_NT40_ENV
printf("Usage: ptserver [-database <db path>] "
- "[-auditlog <log path>] "
+ "[-auditlog <log path>] [-d <debug level>] "
"[-syslog[=FACILITY]] "
"[-p <number of processes>] [-rebuild] "
"[-enable_peer_stats] [-enable_process_stats] "
"[-help]\n");
#else /* AFS_NT40_ENV */
printf("Usage: ptserver [-database <db path>] "
- "[-auditlog <log path>] "
+ "[-auditlog <log path>] [-d <debug level>] "
"[-default_access default_user_access default_group_access] "
"[-restricted] [-rxmaxmtu <bytes>] [-rxbind] "
"[-allow-dotted-principals] "
if (rxBind) {
afs_int32 ccode;
-#ifndef AFS_NT40_ENV
if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
AFSDIR_SERVER_NETINFO_FILEPATH) {
char reason[1024];
AFSDIR_SERVER_NETINFO_FILEPATH,
AFSDIR_SERVER_NETRESTRICT_FILEPATH);
} else
-#endif
{
ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
}
rx_SetMaxProcs(tservice, lwps);
if (rxkadDisableDotCheck) {
rx_SetSecurityConfiguration(tservice, RXS_CONFIG_FLAGS,
- (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK,
- NULL);
+ (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
}
tservice =