diff -urN fam-oss-2.6.4/fam/fam.conf.in fam-new/fam/fam.conf.in --- fam-oss-2.6.4/fam/fam.conf.in Fri May 19 21:46:32 2000 +++ fam-new/fam/fam.conf.in Thu Dec 13 13:43:38 2001 @@ -39,6 +39,18 @@ # xtab_verification = true +# +# idle_timeout sets the number of seconds fam will wait for new +# connections before quitting. A value of zero will cause fam to +# wait indefinitely. This will be overridden by the command-line option +# -T. The default is 5 +idle_timeout = 5 + +# +# Set the interval for polling files to nfs_polling_interval seconds. +# The default is 6 seconds. Overridden by -t. +nfs_polling_interval = 6 + ## This is removed because the HAVE_MAC and HAVE_AUDIT stuff is not done. ### ### By default, fam will use its clients' MAC labels if MAC and IP_SECOPTS diff -urN fam-oss-2.6.4/fam/main.c++ fam-new/fam/main.c++ --- fam-oss-2.6.4/fam/main.c++ Fri May 19 21:46:32 2000 +++ fam-new/fam/main.c++ Thu Dec 13 13:42:34 2001 @@ -64,6 +64,8 @@ #define CFG_LOCAL_ONLY "local_only" #define CFG_XTAB_VERIFICATION "xtab_verification" #define CFG_UNTRUSTED_USER "untrusted_user" +#define CFG_IDLE_TIMEOUT "idle_timeout" +#define CFG_NFS_POLLING_INTERVAL "nfs_polling_interval" static void parse_config(config_opts &opts); static void parse_config_line(config_opts &opts, int line, const char *k, const char *v); @@ -88,7 +90,7 @@ fprintf(stderr, "\t-d\t\tdebug\n"); fprintf(stderr, "\t-v\t\tverbose\n"); fprintf(stderr, "\t-l\t\tno polling\n"); - fprintf(stderr, "\t-t seconds\tset polling interval (default 3 sec)\n"); + fprintf(stderr, "\t-t seconds\tset polling interval (default 6 sec)\n"); fprintf(stderr, "\t-T seconds\tset inactive timeout (default 5 sec)\n"); fprintf(stderr, "\t-p prog.vers\tset RPC program number and version\n"); fprintf(stderr, "\t-L\t\tlocal only (ignore remote requests)\n"); @@ -339,6 +341,9 @@ static void parse_config_line(config_opts &opts, int lineno, const char *key, const char *val) { + char* p; + int secs; + if(!strcmp(key, CFG_UNTRUSTED_USER)) { if (!opts.untrusted_user) opts.untrusted_user = strdup(val); @@ -359,6 +364,30 @@ CFG_INSECURE_COMPAT " is set", opts.config_file, lineno, key); } + } + else if(!strcmp(key, CFG_IDLE_TIMEOUT)) + { + secs = strtoul(val, &p, 10); + if (*p) + { + Log::error("config file %s line %d: value for %s " + "must be an integer. Ignoring.", + opts.config_file, lineno, key); + } + else + { + opts.activity_timeout = secs; + } + } + else if(!strcmp(key, CFG_NFS_POLLING_INTERVAL)) + { + secs = strtoul(val, &p, 10); + if (*p || secs == 0) + Log::error("config file %s line %d: value for %s " + "must be a non-zero integer. Ignoring.", + opts.config_file, lineno, key); + else + opts.pollster_interval = secs; } else if(!strcmp(key, CFG_INSECURE_COMPAT)) { diff -urN fam-oss-2.6.4/man/fam.1m.in fam-new/man/fam.1m.in --- fam-oss-2.6.4/man/fam.1m.in Fri May 19 21:46:32 2000 +++ fam-new/man/fam.1m.in Thu Dec 13 13:45:57 2001 @@ -131,6 +131,16 @@ service remote requests without attempting to perform the verification. If the \f2local_only\f1 configuration option or \f3-L\f1 command-line option is used, \f2xtab_verification\f1 has no effect. +.TP +\f3idle_timeout\f1 +The number of seconds to wait for a new connection before +quitting. Setting this value to \f20\f1 will make fam wait +indefinitely for new connections. Can be overridden by the \f3-T\f1 +option. Defaults to 5 seconds. +.TP +\f3nfs_polling_interval\f1 +The number of seconds between polling nfs servers. This value can be +overridden by the \f3-t\f1 command-line option. Defaults to 5 seconds. .\"## .\"## This stuff is removed because the MAC and SAT stuff isn't implemented. .\"## If you put this back, add sysconf(1) to the SEE ALSO section.