#include <afs/stds.h>
#include <roken.h>
+#ifdef AFS_PTHREAD_ENV
+# include <opr/softsig.h>
+# include <afs/procmgmt_softsig.h> /* must come after softsig.h */
+#endif
#ifdef AFS_NT40_ENV
#include <WINNT/afsevent.h>
static void *CheckSignal(void*);
int LogLevel = 0;
int smallMem = 0;
+int restrictedQueryLevel = RESTRICTED_QUERY_ANYUSER;
int rxJumbograms = 0; /* default is to not send and receive jumbo grams */
int rxMaxMTU = -1;
afs_int32 rxBind = 0;
OPT_rxbind,
OPT_rxmaxmtu,
OPT_trace,
- OPT_dotted
+ OPT_dotted,
+ OPT_restricted_query
};
int
char *interface = NULL;
char *optstring = NULL;
+ char *restricted_query_parameter = NULL;
+
#ifdef AFS_AIX32_ENV
/*
* The following signal action for AIX is necessary so that in case of a
cmd_DisableAbbreviations();
cmd_DisablePositionalCommands();
- opts = cmd_CreateSyntax(NULL, NULL, NULL, NULL);
+ opts = cmd_CreateSyntax(NULL, NULL, NULL, 0, NULL);
/* vlserver specific options */
cmd_AddParmAtOffset(opts, OPT_noauth, "-noauth", CMD_FLAG,
CMD_OPTIONAL, "maximum MTU for RX");
cmd_AddParmAtOffset(opts, OPT_trace, "-trace", CMD_SINGLE,
CMD_OPTIONAL, "rx trace file");
+ cmd_AddParmAtOffset(opts, OPT_restricted_query, "-restricted_query",
+ CMD_SINGLE, CMD_OPTIONAL, "anyuser | admin");
+
/* rxkad options */
cmd_AddParmAtOffset(opts, OPT_dotted, "-allow-dotted-principals",
"permit Kerberos 5 principals with dots");
code = cmd_Parse(argc, argv, &opts);
+ if (code == CMD_HELP) {
+ exit(0);
+ }
if (code)
return -1;
/* rxkad options */
cmd_OptionAsFlag(opts, OPT_dotted, &rxkadDisableDotCheck);
+ /* restricted query */
+ if (cmd_OptionAsString(opts, OPT_restricted_query,
+ &restricted_query_parameter) == 0) {
+ if (strcmp(restricted_query_parameter, "anyuser") == 0)
+ restrictedQueryLevel = RESTRICTED_QUERY_ANYUSER;
+ else if (strcmp(restricted_query_parameter, "admin") == 0)
+ restrictedQueryLevel = RESTRICTED_QUERY_ADMIN;
+ else {
+ printf("invalid argument for -restricted_query: %s\n",
+ restricted_query_parameter);
+ return -1;
+ }
+ free(restricted_query_parameter);
+ }
+
if (auditFileName) {
osi_audit_file(auditFileName);
}
serverLogSyslogTag = "vlserver";
#endif
OpenLog(logFile); /* set up logging */
+#ifdef AFS_PTHREAD_ENV
+ opr_softsig_Init();
+ SetupLogSoftSignals();
+#else
SetupLogSignals();
+#endif
tdir = afsconf_Open(configDir);
if (!tdir) {