-.TH RADWHO 1 "7 April 2005" "" "FreeRADIUS Daemon"
+.TH RADWHO 1 "26 Dec 2011" "" "FreeRADIUS Daemon"
.SH NAME
radwho - show online users
.SH SYNOPSIS
.RB [ \-d
.IR raddb_directory ]
.RB [ \-f ]
+.RB [ \-F
+.IR radutmp_file ]
.RB [ \-i ]
.RB [ \-n ]
.RB [ \-N
.IP \-f
Behave as the 'fingerd' daemon - waits for one line of input, then
prints the output with lines \\r\\n terminated.
+.IP \-F\ \fIradutmp_file\fP
+The file that contains the radutmp file. If this is specified, -d is
+not necessary.
.IP \-i
Shows the session ID instead of the full name.
.IP \-n
fprintf(output, " -d: set the raddb directory (default is %s)\n",
RADIUS_DIR);
fprintf(output, " -f: give fingerd output\n");
+ fprintf(output, " -F <file>: Use radutmp <file>\n");
fprintf(output, " -i: show session ID\n");
fprintf(output, " -n: no full name\n");
fprintf(output, " -N <nas-ip-address>: Show entries matching the given NAS IP address\n");
raddb_dir = RADIUS_DIR;
- while((c = getopt(argc, argv, "d:fnN:sSipP:crRu:U:Z")) != EOF) switch(c) {
+ while((c = getopt(argc, argv, "d:fF:nN:sSipP:crRu:U:Z")) != EOF) switch(c) {
case 'd':
raddb_dir = optarg;
break;
fingerd++;
showname = 0;
break;
+ case 'F':
+ radutmp_file = optarg;
+ break;
case 'h':
usage(0);
break;
exit(0); /* don't bother printing anything else */
}
+ if (radutmp_file) goto have_radutmp;
+
/*
* Initialize mainconfig
*/
}
/* Read the radutmp section of radiusd.conf */
- cs = cf_section_sub_find(cf_section_sub_find(maincs, "modules"), "radutmp");
+ cs = cf_section_find_name2(cf_section_sub_find(maincs, "modules"), "radutmp", NULL);
if(!cs) {
fprintf(stderr, "%s: No configuration information in radutmp section of radiusd.conf!\n",
argv[0]);
/* Assign the correct path for the radutmp file */
radutmp_file = radutmpconfig.radutmp_fn;
+ have_radutmp:
/*
* See if we are "fingerd".
*/