1 | .\" $Id: athinfo.defs.5,v 1.2 1999-04-13 21:16:36 ghudson Exp $ |
---|
2 | .\" |
---|
3 | .\" Copyright 1998, 1999 by the Massachusetts Institute of Technology. |
---|
4 | .\" |
---|
5 | .\" Permission to use, copy, modify, and distribute this |
---|
6 | .\" software and its documentation for any purpose and without |
---|
7 | .\" fee is hereby granted, provided that the above copyright |
---|
8 | .\" notice appear in all copies and that both that copyright |
---|
9 | .\" notice and this permission notice appear in supporting |
---|
10 | .\" documentation, and that the name of M.I.T. not be used in |
---|
11 | .\" advertising or publicity pertaining to distribution of the |
---|
12 | .\" software without specific, written prior permission. |
---|
13 | .\" M.I.T. makes no representations about the suitability of |
---|
14 | .\" this software for any purpose. It is provided "as is" |
---|
15 | .\" without express or implied warranty. |
---|
16 | .TH ATHINFO.DEFS 5 "2 August 2012" |
---|
17 | .SH NAME |
---|
18 | athinfo.defs \- Define athinfo queries |
---|
19 | .SH SYNOPSIS |
---|
20 | .B /etc/athena/athinfo.defs |
---|
21 | |
---|
22 | .B /etc/athena/athinfo.defs.d |
---|
23 | (optional) |
---|
24 | .SH DESCRIPTION |
---|
25 | The file |
---|
26 | .B /etc/athena/athinfo.defs |
---|
27 | defines the queries understood by the athinfo daemon (see |
---|
28 | .BR athinfod (8)). |
---|
29 | Blank lines and lines beginning with '#' are ignored. Each line |
---|
30 | consists of a word giving the query name and a command to be executed |
---|
31 | by /bin/sh in response to the query. The command executed will not |
---|
32 | receive input from the athinfo client. For security reasons, the |
---|
33 | command should not depend on a network filesystem. |
---|
34 | |
---|
35 | The optional directory |
---|
36 | .B /etc/athena/athinfo.defs.d |
---|
37 | may contain query snippet files, whose filenames must end in |
---|
38 | .I .defs\fP. The format is identical to the |
---|
39 | .I athinfo.defs |
---|
40 | file. Queries listed in |
---|
41 | .I athinfo.defs |
---|
42 | will always override queries in these files. In the event of two files |
---|
43 | providing the same query name, the file which sorts first (using |
---|
44 | alphasort() from scandir(3)) will be used. The directory need not be |
---|
45 | present, but if it is present, it (and all files in it) must be readable |
---|
46 | by the user as which athinfod runs, or athinfod will generate an error. |
---|
47 | .SH BUGS |
---|
48 | Actually, when parsing files in |
---|
49 | .B athinfo.defs.d |
---|
50 | athinfod will only generate an error if attempts to read an unreadable |
---|
51 | file. If it finds the query in question in a readable file before |
---|
52 | encountering an unreadable one, no error will be generated. Users with |
---|
53 | an overly paranoid umask who routinely edit the query definition files |
---|
54 | as root should consider checking the file permissions after making |
---|
55 | changes. |
---|
56 | |
---|
57 | If you create a |
---|
58 | .I .defs |
---|
59 | file in |
---|
60 | .B /etc/athena/athinfo.defs.d |
---|
61 | whose full pathname (including the directory) exceeds PATH_MAX, it will |
---|
62 | not be parsed and will be silently skipped. Don't do that. |
---|
63 | .SH EXAMPLE |
---|
64 | The following example defines two queries, one to display the routing |
---|
65 | table and another to display the rc.conf file. |
---|
66 | .PP |
---|
67 | .RS |
---|
68 | .nf |
---|
69 | # Query Command |
---|
70 | |
---|
71 | routes netstat -rn |
---|
72 | rc.conf cat /etc/athena/rc.conf |
---|
73 | .fi |
---|
74 | .RE |
---|
75 | .SH "SEE ALSO" |
---|
76 | .BR athinfod (8), |
---|
77 | .BR athinfo.access (5) |
---|
78 | .SH AUTHOR |
---|
79 | Greg Hudson, MIT Information Systems |
---|
80 | .br |
---|
81 | Copyright 1998 by the Massachusetts Institute of Technology. |
---|