#include <afs/vnode.h>
#include <afs/volume.h>
#include <afs/auth.h>
+#include <afs/authcon.h>
#include <afs/cellconfig.h>
#include <afs/acl.h>
#include <afs/prs_fs.h>
if (!dopanic)
PrintCounters();
+ /* allow audit interfaces to shutdown */
+ osi_audit_close();
/* shut down volume package */
VShutdown();
struct cmd_syndesc *opts;
int lwps_max;
- char *auditFileName = NULL;
+ char *auditIface = NULL;
+ struct cmd_item *auditLogList = NULL;
char *sync_behavior = NULL;
#if defined(AFS_AIX32_ENV)
"disable callback breaks on reattach");
/* general options */
- cmd_AddParmAtOffset(opts, OPT_auditlog, "-auditlog", CMD_SINGLE,
- CMD_OPTIONAL, "location of audit log");
+ cmd_AddParmAtOffset(opts, OPT_auditlog, "-auditlog", CMD_LIST,
+ CMD_OPTIONAL, "[interface:]path[:options]");
cmd_AddParmAtOffset(opts, OPT_auditiface, "-audit-interface", CMD_SINGLE,
- CMD_OPTIONAL, "interface to use for audit logging");
+ CMD_OPTIONAL, "default interface");
cmd_AddParmAtOffset(opts, OPT_debug, "-d", CMD_SINGLE, CMD_OPTIONAL,
"debug level");
cmd_AddParmAtOffset(opts, OPT_mrafslogs, "-mrafslogs", CMD_FLAG,
#if defined(AFS_AIX32_ENV)
if (cmd_OptionAsInt(opts, OPT_minspare, &aixlow_water) == 0) {
if ((aixlow_water < 0) || (aixlow_water > 30)) {
- printf("space reserved %d%% invalid; must be between 0-30%\n",
+ printf("space reserved %d%% invalid; must be between 0-30%%\n",
aixlow_water);
return -1;
}
cmd_OptionAsFlag(opts, OPT_novbc, &novbc);
/* general server options */
- cmd_OptionAsString(opts, OPT_auditlog, &auditFileName);
-
- if (cmd_OptionAsString(opts, OPT_auditiface, &optstring) == 0) {
- if (osi_audit_interface(optstring)) {
- printf("Invalid audit interface '%s'\n", optstring);
- return -1;
- }
- free(optstring);
- optstring = NULL;
- }
+ cmd_OptionAsString(opts, OPT_auditiface, &auditIface);
+ cmd_OptionAsList(opts, OPT_auditlog, &auditLogList);
if (cmd_OptionAsInt(opts, OPT_threads, &lwps) == 0) {
lwps_max = max_fileserver_thread() - FILESERVER_HELPER_THREADS;
cmd_OptionAsString(opts, OPT_config, &FS_configPath);
-
- if (auditFileName)
- osi_audit_file(auditFileName);
+ code = osi_audit_cmd_Options(auditIface, auditLogList);
+ free(auditIface);
+ if (code)
+ return -1;
if (lwps > 64) {
host_thread_quota = 5;
char hoststr[16];
afs_uint32 rx_bindhost;
VolumePackageOptions opts;
+ struct afsconf_bsso_info bsso;
#ifdef AFS_AIX32_ENV
struct sigaction nsa;
#endif
osi_audit_init();
+ memset(&bsso, 0, sizeof(bsso));
+
/* Initialize dirpaths */
if (!(initAFSDirPath() & AFSDIR_SERVER_PATHS_OK)) {
#ifdef AFS_NT40_ENV
OpenLog(&logopts);
LogCommandLine(argc, argv, "starting", "", "File server", FSLog);
- if (afsconf_GetLatestKey(confDir, NULL, NULL) == 0) {
- LogDesWarning();
- }
/* initialize the pthread soft signal handler thread */
opr_softsig_Init();
opr_softsig_Register(SIGTERM, CheckDescriptors_Signal);
#endif
+ /* finish audit interface initalization */
+ osi_audit_open();
+
#if defined(AFS_SGI_ENV)
/* give this guy a non-degrading priority so help busy servers */
schedctl(NDPRI, 0, NDPNORMMAX);
rx_GetIFInfo();
rx_SetRxDeadTime(30);
afsconf_SetSecurityFlags(confDir, AFSCONF_SECOPTS_ALWAYSENCRYPT);
- afsconf_BuildServerSecurityObjects(confDir, &securityClasses, &numClasses);
+
+ bsso.dir = confDir;
+ bsso.logger = FSLog;
+ afsconf_BuildServerSecurityObjects_int(&bsso, &securityClasses,
+ &numClasses);
tservice = rx_NewServiceHost(rx_bindhost, /* port */ 0, /* service id */
1, /*service name */