Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux Complete Command Reference.pdf
Скачиваний:
55
Добавлен:
15.03.2015
Размер:
10.63 Mб
Скачать

1103

Part V:

File Formats

 

Part V: File Formats

1104

 

 

 

intro

intro—Introduction to file formats.

DESCRIPTION

This chapter describes various file formats and protocols, and the used C structures, if any.

AUTHORS

Look at the header of the manual page for the authors and copyright conditions. Note that these can be different from page to page!

Linux, 24 July 1993

active, active.times

active, active.times—List of active Usenet newsgroups.

DESCRIPTION

The file /news/lib/active lists the newsgroups that the local site receives. Each newsgroup should be listed only once. Each line specifies one group; their order in the file does not matter. Within each newsgroup, articles are assigned unique names, which are monotonically increasing numbers.

If an article is posted to newsgroups not mentioned in this file, those newsgroups are ignored. If no valid newsgroups are specified, the article is filed into the newsgroup “junk” and only propagated to sites that receive the “junk” newsgroup.

Each line consists of four fields specified by a space:

name himark lomark flags

The first field is the name of the newsgroup. Newsgroups that start with the three characters to. are treated specially; see innd(8). The second field is the highest article number that has been used in that newsgroup. The third field is the lowest article number in the group; this number is not guaranteed to be accurate and should only be taken as a hint. Note that because of article cancellations, there may be gaps in the numbering sequence. If the lowest article number is greater than the highest article number, there are no articles in the newsgroup. To make it possible to update an entry in-place without rewriting the entire file, the second and third fields are padded with leading zeros to make them a fixed width.

The fourth field can contain one of the following flags:

y

Local postings are allowed

n

No local postings are allowed, only remote ones

m

The group is moderated and all postings must be approved

j

Articles in this group are not kept but only passed on

x

Articles cannot be posted to this newsgroup

=foo.bar

Articles are locally filed into the foo.bar group

If a newsgroup has the j flag, then no articles will be filed into that newsgroup and local postings to that group should not be generated. If an article for such a newsgroup is received from a remote site, it will be filed into the “junk” newsgroup if it is not cross-posted. This is different from not having a newsgroup listed in the file because sites can subscribe to j newsgroups and the article will be propagated to them.

If the fourth field of a newsgroup starts with an equal sign, then the newsgroup is an alias. Articles can be posted to the group but will be treated as if they were posted to the group named after the equal sign. The second and third fields are ignored. Note that the newsgroup header is not modified (Alias groups are typically used during a transition and are typically created with ctlinnd(8)). An alias newsgroup should not point to another alias.

adduser.conf 1105

The file /news/lib/active.times provides a chronological record of when newsgroups are created. This file is normally updated by innd(8) whenever a ctlinnd newgroup command is done. Each line consist of three fields:

name time creator

The first field is the since the epoch—a group.

name of the newsgroup. The second field is the time it was created, expressed as the number of seconds time_t; see gettimeofday(2). The third field is the electronic mail address of the person who created the

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.

SEE ALSO

ctlinnd(8), innd(8)

adduser.conf

adduser.conf—Configuration file for adduser(8) and addgroup(8).

SYNOPSIS

/etc/adduser.conf

DESCRIPTION

The file adduser.conf contains defaults for the programs adduser(8) and addgroup(8). Each option takes the form option = value.

The valid configuration options are

DSHELL

The login shell to be used for all new users. Defaults to /bin/bash.

DHOME

The directory in which new home directories should be created. Defaults to /home.

SKEL

The directory from which skeletal user configuration files should be copied. Defaults to /

 

etc/skel.

FIRST_UID

Specifies the lowest valid UID for normal users on your system. IDs below FIRST_UID are

 

reserved for administrative and system accounts. Defaults to 1000.

USERGROUPS

The USERGROUPS variable can be either yes or no. If yes, each created user will be given their

 

own group to use as a default, and their setup will arrange to have them create files group-

 

writable by default, thus allowing them to effectively use group-writeable filespace areas

 

(such as /usr/local). If no, each created user will be placed in the group whose GID is

 

USERS_GID, and they will create files not group-writeable by default.

USERS_GID

If USERGROUPS is no, then USERS_GID is the GID given to all newly created users. The default

 

value is 100.

FILES

/etc/adduser.conf

SEE ALSO

adduser(8)

Debian GNU/Linux version 1.94

 

Part V: File Formats

1106

 

 

 

aliases

aliases—Aliases file for sendmail.

SYNOPSIS

aliases

DESCRIPTION

This file describes user ID aliases used by . The file resides in and is formatted as a series of lines of the form:

name: name_1, name_2, name_3, ...

The name is the name to alias, and the name_n are the aliases for that name. Lines beginning with whitespace are continuation lines. Lines beginning with # are comments.

Aliasing occurs only on local names. Loops cannot occur because no message will be sent to any person more than once.

After aliasing has been done, local and valid recipients who have a .forward file in their home directory have messages forwarded to the list of users defined in that file.

This is only the raw data file; the actual aliasing information is placed into a binary format in the files and using the program newaliases(1). A newaliases command should be executed each time the aliases file is changed for the change to take effect.

SEE ALSO

newaliases(1), dbm(3), sendmail(8), “Sendmail Installation and Operation Guide,” “Sendmail: An Internetwork Mail Router.”

BUGS

Because of restrictions in dbm(3), a single alias cannot contain more than about 1000 bytes of information. You can get longer aliases by “chaining”—that is, making the last name in the alias a dummy name that is a continuation alias.

HISTORY

The aliases file format appeared in BSD 4.0.

BSD 4, 10 May 1991

cfingerd

cfingerd—Configurable finger daemon.

SYNOPSIS

cfingerd [–c|–d|–e|–o|–v]

 

–c

Check configuration

–d

Run as daemon, not inetd

–e

Emulate local finger without inetd

–o

Turn off all finger queries

–v

Request version information

–c checks your installed configuration. This makes sure there are no existing errors in the current cfingerd.conf file.

–d runs cfingerd as a daemon. Don’t run cfingerd this way if you’re using inetd.

–e allows you to emulate a local finger on a user that exists on your system. This makes it so that you can test cfingerd on your system before installing it. Using the –e directive is the same as installing the software, typing finger username@ and getting the output. Using –e username does the same.

[MESG-N]

cfingerd 1107

–o turns off all finger queries. This makes it so that no one can finger your system—no matter what they try to do.

–v requests cfingerd version information.

DESCRIPTION

cfingerd is a totally new and totally configurable finger daemon—one of the first. It utilizes the finger port (port 79) to provide useful information on each user on your system. However, cfingerd provides a unique twist.

cfingerd was designed for the sole purpose of making output on finger queries configurable. If you want to change any text that is displayed during finger queries, you can configure the finger daemon to display just about anything you want.

cfingerd also takes into account any security breaches and attempts to close them. With .nofinger files, this is displayed instead of finger information, making it possible for users to keep themselves relatively anonymous from outside users.

WHY WAS IT DONE?

The answer is simple: security. Many sites turn off finger for the reason that they don’t want outside users to see who’s on their system or get information about a specific user on their system. This seemed unfair to the rest of the users out there, so this program was created. Those sites were waiting for this type of program. Many sites that originally had their finger turned off turned them back on because of cfingerd.

Many sites complained that they wanted the capability to create a fake user or a user that doesn’t exist but calls a prewritten shell script. cfingerd takes this into account and provides the best method possible for creating such scripts. (See cfingerd.conf(5) for more information on the configuration file.)

FEATURES cfingerd PROVIDES AND DESCRIPTIONS OF EACH

cfingerd was totally rewritten. Why is this? The older version of cfingerd had quite a few bugs, and it didn’t quite do all the things that cfingerd now does. This new version was totally revamped, and most of the bugs that were in the older version of cfingerd were removed in this one. The code is also more compact.

Header and footer displays were a big part of the original release of cfingerd and shall continue to remain in all versions. Headers and footers are only displays at the beginning and ending of all finger displays and are used as unique little advertisements.

The last time displayed is always a critical issue. It’s covered in cfingerd. cfingerd simply shows how many times this user is connected, what their idle time is on each tty they’re connected to, and whether they are accepting messages. If they’re not accepting messages, a display will be shown. This display also shows the last time mail was read and whether this user has mail.

Stand-alone and inetd support is compiled into the program, but only inetd support is given for the time being. The reason is that I have not yet added the option for stand-alone daemon mode.

.nofinger files are used when a user wants to remain anonymous. These files should be placed in their home directories and can display anything they want. There’s just a few restrictions. These .nofinger display files cannot be character devices, directories, FIFOs, soft or hard links, or anything else of that caliber. They must only be normal files.

Fake users were supported for the simple fact that many sites want to create users who don’t exist and make them execute a shell. If you want this done, install a fake user. Read cfingerd.conf(5) for more information on these useful options.

Service displays were used to show what fake users you have installed on your system. These can be formatted however you want and are explained in cfingerd.conf(5).

Searching for usernames is a powerful feature that cfingerd takes full advantage of. If you are looking for a specific username on the system or don’t know what their name is, simply use the search.username directive with cfingerd, and you can search for a user on your system.

Searching for usernames is not case sensitive. If you are searching for a specific username or part of the user’s name, chances are that it’ll be displayed.

 

Part V: File Formats

1108

 

 

 

There’s also an option to display your public PGP key if you have one. This is very useful if you want to keep your mail or other information secret to yourself and don’t want “big brother” watching over your shoulder as you talk among yourselves. (Thanks to Andy Smith for this patch.) The standard plan file is .plan, project is .project, and PGP info is .pgpkey.

Remember, any or all of these options stated can be turned on or off at will. If you want a specific option turned off, turn it off.

ERROR MESSAGES

Any error messages that result are fairly easy to debug if you know what to look for.

Segmentation violations don’t always occur, but if they ever do, you can pretty easily figure out what’s going on. Unfortunately, cfingerd doesn’t have any compatibility with older cfingerd.conf files, so if you get a segmentation violation, this means (usually) that your cfingerd.conf file needs to be replaced.

Time-outs usually mean that a script has timed out or a connection to another site timed out.

SYSLOGGING MESSAGES

There’s no real way to describe SYSLOG messages because they can be changed as the system administrator chooses. Although, examples can be given based on the standard configuration that was distributed.

If any IP addresses cannot be matched to a hostname, SYSLOG will display IP: Hostname not matched.

If the renice fails (to make the program run at the highest priority), then SYSLOG will display Fatal - Nice died: (reason).

If there is no buffer information is waiting in the STDIN buffer, SYSLOG will display STDIN contains no data.

If a trusted host fingers your site, a <- Trusted will appear.

If a rejected host fingers your site, a <- Rejected will appear.

If root is fingered on your site, it will display Root.

If a service listing was fingered on your site, SYSLOG will display Service listing.

If a user listing was requested, SYSLOG will display User listing.

If a fake user was requested, SYSLOG will display Fake user.

If whois data was requested, SYSLOG will display Whois request. (Note that whois was not implemented in this release because it wasn’t RFC compliant.)

Any extra information pertaining to the incoming finger is displayed in the syslogging area. (It’s also recommended that you reconfigure syslog.conf(5) to display to an unused VT.)

BUGS

When data is forwarded to other sites for fingering, it shows the output of the system that it forwarded the finger request to. This has got to change.

On ELF-specific systems, services lists usually show a bit of garbage at the beginning of the finger display. This doesn’t appear to be a problem on a.out systems, so if you have ELF, you might want to compile cfingerd as a.out if this becomes a problem.

PLANS

Any other options or improvements will probably come from user suggestions.

Later plans will mean you can define your own display formats for the finger display. This means that you can redefine how you want your finger display to look.

CONTACTING

If you like the software and you want to learn more about it or want to see a feature added to it that isn’t already here, write to khollis@bitgate.com.

cfingerd.conf 1109

I’ve received calls at work pertaining to the software, and although I appreciate the fact that people like the software I wrote, I’d appreciate it if you leave me e–mail and be considerate.

cfingerd is now being maintained by Michael Jarvis. Any additions after cfingerd 1.2.3 should be directed toward Michael. You can reach him at mjarvis@qns.com.

If you want to see other projects that Bitgate Software is currently developing, check out the Web page at http:// www.bitgate.com/. This will contain all the update information on the software that is being developed and that is already released.

SEE ALSO

cfingerd.conf(5), finger(1), userlist(1), syslog.conf(5)

cfingerd 1.2.3, 24 May 1996

cfingerd.conf

cfingerd.conf—Configurable finger daemon configuration file.

SYNOPSIS

/etc/cfingerd.conf

DESCRIPTION

cfingerd.conf is the configuration file for cfingerd. This has been totally rewritten to support a more readable configuration file. This version of the new configuration file is not compatible with the older versions from 1.0.3 or earlier.

Each line in the configuration file is split into three sections: FILES, CONFIG, and HOSTS. Each one of those sections is split into subsections.

Subtext of each option is either Boolean options, string options, or switchable options, all changeable by the system administrator.

Each section is split into a series of sections that resembles C-type definition; it’s not exact but close enough to be familiar. There’s only one exception: These are not case sensitive. Any casing will do as long as the option is legal.

Thus, each option is formatted like this:

OPTION sub_option_name = {

(tab/space) string_option = “string format”, (tab/space) boolean_option = [BOOL, BOOL], (tab/space) +/–internal_config_option (tab/space) host.name.here

}

This shows that string options are strings put into quotes, Boolean options are given as TRUE and FALSE, switchable options are given with the + or directive, and hostnames are used as substrings so that wildcards are not necessary.

You can add comments using the hash mark (#) at the beginning of the line. Please note that no comments are allowed inside of an OPTION.

DISPLAY FILES SECTION (FILES display files)

Each option here is a string option. These are formatted as the example shows.

PLAN is the plan file that is used when displaying a plan. The standard here is .plan.

PROJECT is the project file that is used when displaying a project description. The standard here is .project.

PGP_KEY is the Pretty–Good–Privacy file that is shown when displaying a public or private key. The standard here is .pgpkey.

 

Part V: File Formats

1110

 

 

 

(The preceding three files must be world readable but should not be world writable. This makes sure that cfingerd can read the file once it becomes the “nobody” UID/GID. This is generally a good idea for protection.)

NO_FINGER is the file that is shown when a user wants to remain anonymous. This is usually the case with root users (which should be standard anyway). The standard here is .nofinger. This file can only be a standard displayable file.

LOGFILE is the file that is used to keep logs of everything that happens to both your system and the finger program. These logs are kept as backups for your finger file and can be used to guard against attacks against your system if a finger attack occurs. Remember, the cfingerd.conf file is root owned, so this file should be kept in a safe, hidden place.

HEADER_DISPLAY is the file that is displayed at the top of each finger display. The standard here is /etc/cfingerd/ top_finger.txt.

FOOTER_DISPLAY is the file that is displayed at the end of each finger display. The standard here is /etc/cfingerd/ bottom_finger.txt.

NO_USER_BANNER is the file that is displayed if the user doesn’t exist. The standard here is /etc/cfingerd/nouser_banner.txt.

NO_NAME_BANNER is the file that is displayed if no name was specified in a finger display. This is used in conjunction with the

SYSTEM_LIST option (explained later). The standard here is /etc/cfingerd/noname_banner.txt.

REJECTED_BANNER is the file that is displayed if a rejected host tries to finger your system for any reason. The standard here is / etc/cfingerd/rejected_banner.txt.

FINGER DISPLAY CONFIGURE SECTION (CONFIG finger display)

Each option in this section is Boolean. The way this works is as follows: The first Boolean option is the setting for a remote host or a host that fingers you from the outside. The second Boolean option is the setting for the local host or trusted host. This is what people from your own system will see.

Each option has a or + option. This is for user–overridable options, which will be in the next release of cfingerd. These will allow users to manipulate if this information is displayed when that specific user is fingered.

HEADER_FILE displays the header file at the beginning of each finger query.

FOOTER_FILE displays the footer file at the end of each finger query.

LOGIN_ID displays the login ID of that particular user.

REAL_NAME displays the real name of that particular user.

DIRECTORY displays the user’s directory.

SHELL displays the user’s shell.

ROOM_NUMBER displays the user’s room number.

WORK_NUMBER displays the user’s work phone number.

HOME_NUMBER displays the user’s home phone number.

OTHER displays the user’s other information.

LAST_TIME_ON displays the last time the user logged into the fingered system.

IF_ONLINE displays whether the user is currently logged into the fingered system.

TIME_MAIL_READ displays the last time that the fingered user read mail.

DAY_MAIL_READ displays the last day that the fingered user read his or her mail.

ORIGINATION displays the site from which the user logged in (if applicable).

PLAN displays the user’s plan file.

PROJECT displays the user’s project file.

PGP displays the user’s Pretty–Good–Privacy key file.

cfingerd.conf 1111

NO_NAME_BANNER displays the banner if no username was given.

REJECTED_BANNER displays the rejected banner if the site fingering your system was in the banned–site listing.

SYSTEM_LIST displays the system list if one was requested.

NO_NAME displays the no–name display file if no user was selected.

INTERNAL CONFIG CONFIGURE SECTION (CONFIG internal config)

Each item in this section is a switchable option. This means that a + before the item is turned on and a before the item is turned off.

ALLOW_MULTIPLE_FINGER_DISPLAY allows you to give a sorted output of all users on more than one specific system. This is useful when you have more than one ISP machine, located in different cities or even states.

ALLOW_SEARCHABLE_FINGER allows you to let others outside your system (or within it) to search for a specific username by using the search.username directive.

ALLOW_NO_IP_MATCH_FINGER allows you to let sites finger your system if a hostname could not be matched to their IP address successfully.

ALLOW_USER_OVERRIDE will allow your users to override specific options in the FINGER DISPLAY section that you enable.

ALLOW_USERLIST_ONLY will allow other sites that are fingering your system for a specific compiled user list to finger your system and get a user listing of who’s online. This could be a security risk, so you might want to turn this option off if you feel it’s a security risk.

ALLOW_FINGER_FORWARDING will allow other sites to forward finger requests to a different machine if the user could not be located on the current machine. (In order to use this option, you must have the HOSTS finger forward option set and have other sites in there.)

ALLOW_STRICT_FORMATTING makes the finger display remove all returns between display options. This makes the finger display look horrible (as with GNU Finger or the other generic fingers) and makes your system look, well, “generic.”

ALLOW_VERBOSE_TIMESTAMPING makes the timestamp that is displayed (at any place) very verbose. For instance, where it used to say

On since Sat Aug 12 03:43PM(PDT)

would now be shown as

On since Sat Aug 12, 1995 03:43PM(PDT)

(Basically, ALLOW_VERBOSE_TIMESTAMPING just takes up more room on the display field.)

ALLOW_NONIDENT_ACCESS lets you only allow connections from sites that run the ident daemon (or RFC 1413-compliant program.) This is for security sake and is a good measure against unknown users trying to finger your system. If this option is enabled, users who do not have identd running on their system (such as Windows users) will be able to finger your system. Systems not running identd will return unknown as the user ID and will not be permitted to finger a user on your system.

ALLOW_FINGER_LOGGING enables cfingerd to use the LOGFILE file to store any logs of activity that happen to your system via finger.

ALLOW_LINE_PARSING makes cfingerd parse each line of every display file (including the plan, project, and pgp files) for any cfingerd-specific $ commands. If any are found, cfingerd will parse these commands and display correct information accordingly. Otherwise, if this is turned off, the display will appear without parsed commands.

ALLOW_EXECUTION will allow users to execute scripts in place of their .plan, .project, and .pgp files. This is used to display the standard output of another program directly to the screen of the user. Keep in mind that this is a huge security risk if you choose to use it. It’s normally suggested that this option remain off, but you can turn it on if necessary. Nevertheless, these programs are called as nobody.nogroup.

 

Part V: File Formats

1112

 

 

 

ALLOW_FAKEUSER_FINGER turns on or off the fake user option in cfingerd. If you want fake users to be defined and available to be fingered, you will want to enable this option. This can be a security risk in some instances if you allow for searchable fingers and your script calls an execute routine on that variable. Chances are that’ll never happen.

ALLOW_USERLOG will allow users to keep track of who has fingered them and at what time. A little file called .fingerlog will appear in their directory, which they can examine to see who has fingered them. If you don’t care about this, you can disable it. Otherwise, it’s not a bad idea. (It also logs root fingers as well.)

SYSTEM LIST SITES CONFIGURE SECTION (CONFIG system list sites)

This is just a series of hostnames that you want to finger when displaying your user-list display. If you have more than one system that you want to show, simply put their hostname in this list, separated on a line by itself.

For example, if I have a separate ISP system that I’m running on the side, say chatlink.com, I would change my configuration to say

CONFIG system_list_sites = { chatlink.com, localhost }

Remember, if you are listing only a couple of sites, list the sites you will want to have listed (in order) first. The ending entry must be localhost or the finger listing will not include your site. If you include localhost anywhere else in the list, it will stop once it has reached the localhost entry, so remember to list it last!

I want to get a user listing from my own machine and from chatlink.com’s system. This would be automatically formatted nicely (sorted and parsed) and would display on the screen in sorted order. This program is usually used in tandem with the supplied userlist(1) program.

If no system list sites are specified, multiple system sites will not be specified.

TRUSTED HOST SECTION (HOSTS trusted)

This is a listing of the sites that you allow to finger your system exclusively, giving them the same access that your local users would get. In other words, they are treated as localhost users.

Each site that you list in this section should be separated by using the , directive. You can include up to 80 sites in this listing.

Wildcards are supported in this section, and you can use them in the regex format as well. Any wildcards with *, ?, or any other regex wildcard matching character will work. IP addresses will also work. Hostnames are compared case insensitive.

REJECTED HOST SECTION (HOSTS rejected)

This is a listing of the sites that you do not allow to finger your system. These sites don’t get to finger anyone (or anything for that matter) on your system, regardless of what they try to do. In essence, finger is cut off to that particular system.

Each site that you list in this section should be separated by using the , directive. You can include up to 80 sites in this listing.

Wildcards are supported in this section, and you can use them in the regex format as well. Any wildcards with *, ?, or any other regex wildcard matching character will work. IP addresses will also work. Hostnames are compared case insensitive.

FORWARDED HOST SECTION (HOSTS finger forward)

This is a listing of sites that are used to forward a finger query to when a finger request was processed but that particular user was not found on the associated system. It will step through this listing, and it will search for the user in question. If the user could not be found, then it will step through to the next host and the next, until it finds one.

Each site that you list in this section should be separated by using the , directive. You can include up to 80 sites in this listing.

Wildcards are supported in this section, and you can use them in the regex format as well. Any wildcards with *, ?, or any other regex wildcard matching character will work. Hostnames are compared case insensitive.

If you do not specify any forwarding sites in this section, finger forwarding will be disabled for your system.

WHOIS_USER
FAKE_USER
ROOT_FINGER
NO_PLAN
ROOM_NUMBER WORK_NUMBER
USER_NAME REAL_NAME

cfingerd.conf

1113

 

FINGER STRINGS CONFIGURE SECTION (CONFIG finger strings)

Each option in this section is a string that can be changed to fit your needs when displaying finger information. These strings are limited to about 20 characters on the display. (If you use more than 20, the finger display will end up looking strange.)

is the string that is displayed when the user’s username is shown. is the string that is displayed when the user’s real name is shown.

DIRECTORY is the string that is displayed when the user’s directory is shown.

SHELL is the string that is displayed when the user’s shell is shown.

is the string that is displayed when the user’s room number is shown.

is the string that is displayed when the user’s work phone number is shown.

HOME_NUMBER is the string that is displayed when the user’s home phone number is shown.

OTHER is the string that is displayed when the user’s other display information is show.

PLAN is the string that is displayed when the user’s plan is shown.

PROJECT is the string that is displayed when the user’s project is shown.

PGPKEY is the string that is displayed when the user’s PGP key is shown.

is the string that is displayed when the user doesn’t have a plan file to show you.

NO_PROJECT is the string that is displayed when the user doesn’t have a project file to show you.

NO_PGP is the string that is displayed when the user doesn’t have a PGP key file to show you.

WAIT is the string that is shown when the system gathers information from other sites for a user listing.

INTERNAL STRINGS CONFIGURE SECTION (CONFIG internal strings)

These strings are changeable and can be any length you want (within reason). These strings are concatenated into the syslogging display when the appropriate finger has been issued. This section also includes error messages that may occur.

NO_IP_HOST is shown when there is no hostname that matches the incoming IP address. This usually indicates that either the site didn’t register its IP address with the InterNIC or it is coming from a hacked site.

RENICE_FATAL is shown when the system failed to change the execution priority on the current process of cfingerd.

STDIN_EMPTY is shown when the input buffer on the cfingerd port is empty. (This should never really happen; it’s here for sanity.)

TRUSTED_HOST is shown when a trusted host fingers your system. If you do not specify a trusted host, cfingerd will insert localhost into this field.

REJECTED_HOST is shown when a rejected host fingers your system. If you do not specify a rejected host, cfingerd will insert 0.0.0.0 into this field.

is shown when a user fingers root.

SERVICE_FINGER is shown when a user requests fake user services from your system.

USER_LIST is shown when a user requests a user listing from your system. is shown when a user fingers a fake user from your system.

is shown when a user fingers a user with a WHOIS query. (This option is not yet available.)

FINGER_DENY is shown when a user tries to finger with a forward request such as user@host1@host2. This is not supported because it could result in finger loops and a lot of traffic.

SIGNAL STRINGS CONFIGURE SECTION (CONFIG signal strings)

This section is used in changing the output that is given when a system crashes, or a signal is caught, and reported to the finger output.

 

Part V: File Formats

1114

 

 

 

The supported caught signals are as follows:

SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGFPE, SIGUSR1, SIGSEGV, SIGUSR2, SIGPIPE, SIGALRM, SIGTERM, SIGCONT,

SIGTSTP, SIGTTIN, SIGTTOU, SIGIO, SIGXCPU, SIGXFSZ, SIGVTALRM, SIGPROF, SIGWINCH

FINGER PROGRAMS FILES SECTION (FILES finger programs)

These are the programs that are called when a specific action is take on the finger display.

FINGER is the file that is used when a user listing is requested from your machine. This is used in the standard user list and in the sorted user list, so it is wise to use the standard here: /usr/sbin/userlist.

WHOIS is the program that is used when a WHOIS request is done on a specific user.

FINGER FAKE USERS FILES SECTION (FILES finger fakeusers)

These are the ever–popular fake users that you can create on your system. These users are ones that don’t exist (and should not exist, for that matter). These are, instead, treated as normal scripts that can be called for your use.

The format is as follows for fake users:

fake_username Script_name SEARCHBOOL script

fake_username is the name of the fake user you want to request. Make sure that this is a user that does not exist on your system. Keep in mind that if you create a fake username and that user already exists, the fake username will be shown.

Script_name is the standard name of your script. This is used in the display of your services listing.

SEARCHBOOL specifies whether parameters can be sent to that specific fake user. If you decide to use the SEARCHBOOL option (TRUE in this case), the passed variables are

$1

First passed option

$2

Second passed option

$3

Third passed option

$4

Fourth passed option

(If more than four options were passed to this, the request will be ignored, and an error message will be returned to the user who requested the finger request.)

script is the location of your script. It should be chmod 700 and readable only by root.

If you do not specify any fake users, a fake user called None will be created. This is a fake user that does nothing and calls / dev/null for the script.

SERVICES HEADER CONFIGURE SECTION (CONFIG services header)

This is the display that is given during a services finger. It should be formatted the same way that you want it to display on the screen.

When specifying the finger formatted options, you should specify them as C formatted strings as well, with the standard options. This should always be given last in the display.

An example of this is

Welcome to this system’s services! User: Service name: Searchable: ——– ——————– ———–

%-8s %-20s %-s

Remember to keep the format string last or a SIGSEGV will result.

SERVICES POSITIONS CONFIGURE SECTION (CONFIG services positions)

This specifies where in the preceding display string that the information from a service listing is to appear. These numbers can be anywhere between 1 and 3.

control.ctl 1115

USER specifies the position of the username listing.

SERVICE specifies the position of the service full–name listing.

SEARCH specifies the position of the Boolean search display.

CONTACTING

If you like this program and have questions or comments about the program’s functionality or what–have–you, write to khollis@bitgate.com.

As always, I appreciate any suggestions or bug reports you might have, so bring them on!

SEE ALSO

cfingerd(8), cfingerd.text(5), userlist(1), finger(1), regex(3), regexp(3)

16 May 1996

cfingerd text rules

EXPLANATION

cfingerd offers different commands that can be placed in text files to display corresponding information. Each command used with cfingerd in text files begins with a dollar sign ($). This usually indicates to cfingerd that when it’s displaying a file, it parses the command directly after that character.

If you want to display a raw $ sign, simply put two $ signs together, or $$.

TEXT COMMANDS

The following is a list of text commands and what they do. Each of the text commands can be in any text case; it doesn’t matter.

$CENTER

Displays the entire contents of the line. This command must start at the beginning of the

 

line. This is a very common command.

$DATE

Displays the current system date in the format of MM/DD/YY.

$TIME

Displays the current system time in the format HH:MM A/PM (time zone).

$IDENT

Displays the identity of the current person fingering your system.

$COMPILE_DATETIME

Displays the date and time of which the current issue of cfingerd was compiled on your

 

system.

$VERSION

Displays the current version of cfingerd.

$EXEC

Executes a file with x parameters after it. The $EXEC command must be on a line by itself

 

in order to function properly. The command is executed as nobody.nogroup.

SEE ALSO

cfingerd(8), cfingerd.conf(5), finger(1), userlist(1), any of the included docs with the standard cfingerd distribution.

cfingerd 1.2.1, 6 Jan 1996

control.ctl

control.ctl—Specify handling of Usenet control messages.

 

Part V: File Formats

1116

 

 

 

DESCRIPTION

The file /news/lib/control.ctl is used to determine what action is taken when a control message is received. It is read by the parsecontrol script, which is called by all the control scripts. (For an explanation of how the control scripts are invoked, see innd(8).)

The file consists of a series of lines; blank lines and lines beginning with a number sign (#) are ignored. All other lines consist of four fields separated by a colon:

message:from:newsgroups:action

The first field is the name of the message for which this line is valid. It should be either the name of the control message, or the word all to mean that it is valid for all messages.

The second field is a shell-style pattern that matches the e-mail address of the person posting the message. (The poster’s address is first converted to lowercase.) The matching is done using the shell’s case statement; see sh(1) for details.

If the control message is newgroup or rmgroup, then the third field specifies the shell-style pattern that must match the group being created or removed. If the control message is of a different type, then this field is ignored.

The fourth field specifies what action to take if this line is selected for the message. The following actions are understood:

doit

The action requested by the control message should be performed. In most cases, the control script

 

will also send mail to Usenet.

doifarg

If the control message has an argument, this is treated as a doit action. If no argument was given, it

 

is treated as a mail entry. This is used in a sendsys entries script so that a site can request its own

 

newsfeeds(5) entry by posting a sendsys mysite article. On the other hand, sendsys bombs ask that

 

the newsfeeds file be sent; if you use doifarg, such messages will not be processed automatically.

doit=file

The action is performed, but a log entry is written to the specified log file, file. If file is the word

 

mail, then the record is mailed. A null string is equivalent to /dev/null. A pathname that starts with

 

a slash is taken as the absolute filename to use as the log. All other pathnames are written to /var/

 

log/news/file.log. The log is written by writelog (see newslog(8)).

drop

No action is taken; the message is ignored.

log

A one-line log notice is sent to standard error. innd normally directs this to the file /var/log/news/

 

errlog.

log=file

A log entry is written to the specified log file, file, which is interpreted as described previously.

mail

A mail message is sent to the news administrator.

Lines are matched in order; the last match found in the file is the one that is used. For example, with the following three lines:

newgroup:*:*:drop newgroup:tale@*.uu.net:comp.*|misc.*|news.*|rec.*|sci.*|soc.*|talk.*:doit newgroup:kre@munnari.oz.au:aus.*:mail

A newgroup coming from tale at a UUNET machine will be honored if it is in the mainstream Usenet hierarchy. If kre posts a newgroup message creating aus.foo, then mail will be sent. All other newgroup messages are ignored.

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.

SEE ALSO

innd(8), newsfeeds(5), scanlogs(8)

cvs

cvs—Concurrent Versions System support files.

cvs 1117

SYNOPSIS

$CVSROOT/CVSROOT/commitinfo,v $CVSROOT/CVSROOT/cvsignore,v $CVSROOT/CVSROOT/cvswrappers,v $CVSROOT/CVSROOT/editinfo,v $CVSROOT/CVSROOT/history $CVSROOT/CVSROOT/loginfo,v $CVSROOT/CVSROOT/modules,v $CVSROOT/CVSROOT/rcsinfo,v $CVSROOT/CVSROOT/taginfo,v

DESCRIPTION

cvs is a system for providing source control to hierarchical collections of source directories. Commands and procedures for using cvs are described in cvs(1). cvs manages source repositories, the directories containing master copies of the revisioncontrolled files, by copying particular revisions of the files to (and modifications back from) developers’ private working directories. In terms of file structure, each individual source repository is an immediate subdirectory of $CVSROOT. The files described here are supporting files; they do not have to exist for cvs to operate, but they allow you to make cvs operation more flexible.

You can use the modules file to define symbolic names for collections of source maintained with cvs. If there is no modules file, developers must specify complete pathnames (absolute or relative to $CVSROOT) for the files they want to manage with cvs commands. You can use the commitinfo file to define programs to execute whenever cvs commit is about to execute. These programs are used for “precommit” checking to verify that the modified, added, and removed files are really ready to be committed. Some uses for this check might be to turn off a portion (or all) of the source repository from a particular person or group or perhaps to verify that the changed files conform to the site’s standards for coding practice.

You can use the cvswrappers file to record cvs wrapper commands to be used when checking files into and out of the repository. Wrappers allow the file or directory to be processed on the way in and out of cvs. The intended uses are many; one possible use is to reformat a C file before the file is checked in so all the code in the repository looks the same. You can use the loginfo file to define programs to execute after any commit, which writes a log entry for changes in the repository. These logging programs might be used to append the log message to a file or send the log message through electronic mail to a group of developers. You can also post the log message to a particular newsgroup.

You can use the taginfo file to define programs to execute after any tag or rtag operation. These programs might be used to append a message to a file listing the new tag name and the programmer who created it, to send mail to a group of developers, or to post a message to a particular newsgroup. You can use the rcsinfo file to define forms for log messages. You can use the editinfo file to define a program to execute for editing or validating cvs commit log entries. This is most useful when used with a rcsinfo forms specification because it can verify that the proper fields of the form were filled in by the user committing the change. You can use the cvsignore file to specify the default list of files to ignore during update. You can use the history file to record the cvs commands that affect the repository. The creation of this file enables history logging.

FILES

modules

The modules file records your definitions of names for collections of source code.

 

cvs will use these definitions if you use cvs to check in a file with the right

 

format to $CVSROOT/CVSROOT/modules,v. The modules file can contain blank lines

 

and comments (lines beginning with #) as well as module definitions. Long lines

 

can be continued on the next line by specifying a backslash (\) as the last

 

character on the line. A module definition is a single line of the modules file in

 

either of two formats. In both cases, mname represents the symbolic module name,

 

and the remainder of the line is its definition.

 

mname –a aliases ...

 

This represents the simplest way of defining a module mname. The –a flags the

 

definition as a simple alias: cvs will treat any use of mname (as a command

 

argument) as if the list of names aliases had been specified instead. aliases may

 

Part V: File Formats

1118

 

 

 

contain either other module names or paths. When you use paths in aliases,cvs checkout creates all intermediate directories in the working directory, just as if the path had been specified explicitly in the cvs arguments.

mname [ options ] dir [ files ... ] [&module ...]

In the simplest case, this form of module definition reduces to mname dir. This defines all the files in directory dir as module mname. dir is a relative path (from $CVSROOT) to a directory of source in one of the source repositories. In this case, on checkout, a single directory called mname is created as a working directory; no intermediate directory levels are used by default, even if dir was a path involving several directory levels. By explicitly specifying files in the module definition after dir, you can select particular files from directory dir. The sample definition for modules is an example of a module defined with a single file from a particular directory. Here is another example:

m4test unsupported/gnu/m4 foreach.m4 forloop.m4

With this definition, executing cvs checkout m4test will create a single working directory m4test containing the two files listed, which both come from a common directory several levels deep in the cvs source repository. A module definition can refer to other modules by including &module in its definition. The checkout command creates a subdirectory for each such module in your working directory. New in cvs 1.3; avoid this feature if sharing module definitions with older versions of cvs.

Finally, you can use one or more of the following options in module definitions: –d name names the working directory something other than the module name. This option is new in cvs 1.3; avoid this feature if sharing module definitions with older versions of cvs. –i prog allows you to specify a program prog to run whenever files in a module are committed. prog runs with a single argument, the full pathname of the affected directory in a source repository. The commitinfo, loginfo, and editinfo files provide other ways to call a program on commit. –o prog allows you to specify a program prog to run whenever files in a module are checked out. prog runs with a single argument, the module name. –e prog allows you to specify a program prog to run whenever files in a module are exported. prog runs with a single argument, the module name. –t prog allows you to specify a program prog to run whenever files in a module are tagged. prog runs with two arguments: the module name and the symbolic tag specified to rtag. –u prog allows you to specify a program prog to run whenever cvs update is executed from the top-level directory of the checked-out module. prog runs with a single argument, the full path to the source repository for this module.

commitinfo, loginfo, rcsinfo, editinfo These files all specify programs to call at different points in the cvs commit process. They have a common structure. Each line is a pair of fields: a regular expression, separated by whitespace from a filename or command-line template. Whenever one of the regular expression matches a directory name in the repository, the rest of the line is used. If the line begins with a # character, the entire line is considered a comment and is ignored. Whitespace between the fields is also ignored. For loginfo, the rest of the line is a command-line template to execute. The templates can include not only a program name, but also whatever list of arguments you want. If you write %s somewhere on the argument list, cvs supplies, at that point, the list of files affected by the commit. The first entry in the list is the relative path within the source repository where the change is being made. The remaining arguments list the files that are being modified, added, or removed by this commit invocation. For taginfo, the rest of the line is a command-line template to execute. The arguments passed to the command are,

 

cvs

 

 

 

 

1119

 

 

 

 

 

 

 

in order, the tagname, operation (add for tag, mov for tag -F, and del for tag -d),

 

and repository, and any remaining are pairs of filename revision. A nonzero exit

 

of the filter program will cause the tag to be aborted. For commitinfo, the rest of

 

the line is a command-line template to execute. The template can include not

 

 

only a program name but also whatever list of arguments you want. The full path

 

to the current source repository is appended to the template, followed by the

 

 

filenames of any files involved in the commit (added, removed, and modified

 

 

files). For rcsinfo, the rest of the line is the full path to a file that should be

 

 

loaded into the log message template. For editinfo, the rest of the line is a

 

 

command-line template to execute. The template can include not only a

 

 

program name but also whatever list of arguments you want. The full path to the

 

current log message template file is appended to the template. You can use one of

 

two special strings instead of a regular expression: ALL specifies a command-line

 

 

template that must always be executed, and DEFAULT specifies a command-line

 

 

template to use if no regular expression is a match. The commitinfo file contains

 

commands to execute before any other commit activity, to allow you to check

 

 

any conditions that must be satisfied before commit can proceed. The rest of the

 

commit will execute only if all selected commands from this file exit with exit

 

 

status 0. The rcsinfo file allows you to specify log templates for the commit

 

 

logging session; you can use this to provide a form to edit when filling out the

 

 

commit log. The field after the regular expression, in this file, contains filenames

 

(of files containing the logging forms) rather than command templates. The

 

 

editinfo file allows you to execute a script before the commit starts but after the

 

log information is recorded. These “edit” scripts can verify information recorded

 

in the log file. If the edit script exits with a nonzero exit status, the commit is

 

 

aborted. The loginfo file contains commands to execute at the end of a commit.

 

The text specified as a commit log message is piped through the command;

 

 

typical uses include sending mail, filing an article in a newsgroup, or appending

 

to a central file.

 

cvsignore, .cvsignore

The default list of files (or sh(1) filename patterns) to ignore during cvs update.

 

At startup time, cvs loads the compiled default list of filename patterns (see

 

 

cvs(1)). Then the per-repository list included in $CVSROOT/CVSROOT/cvsignore is

 

 

loaded, if it exists.

 

 

Then the per-user list is loaded from $HOME/.cvsignore. Finally, as cvs traverses

 

 

through your directories, it will load any per-directory .cvsignore files whenever

 

it finds one. These per-directory files are only valid for exactly the directory that

 

contains them, not for any subdirectories.

 

history

Create this file in $CVSROOT/CVSROOT to enable history logging (see the description

 

of cvs history).

 

SEE ALSO

cvs(1)

COPYING

Copyright © 1992, Cygnus Support, Brian Berliner, and Jeff Polk.

Permission is granted to make and distribute verbatim copies of this manual, provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

 

Part V: File Formats

1120

 

 

 

Permission is granted to copy and distribute translations of this manual into another language, under the preceding conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English.

12 February 1992

DEVINFO

DEVINFO—Device entry database.

DESCRIPTION

DEVINFO is a text file that describes all the possible devices for a system. It is used by MAKEDEV(8) to create special file entries in / dev. It may be named either /dev/DEVINFO or /etc/devinfo. Information about custom local devices, if any, should be placed in DEVINFO.local or /etc/devinfo.local, which has the same syntax.

The file format is free-form. C, C++, and shell comments are understood. There are basically four statements:

ignore { proc-device... }

This causes the specified names to be ignored if found in /proc/devices.

batch { device... }

This creates a “batch”—a collection of devices that will all be created when the batch is

 

invoked. For example, in the standard DEVINFO, “generic” is a batch.

block device-spec

This defines one or more block devices.

char device-spec

This defines one or more character devices.

Here is a sample device-spec:

 

(std, 1) {

 

mem (kmem) : 1

 

null (public) : 3

 

core -> “/proc/kcore”

 

}

 

This example defines a group of devices called std, with major number 1. Running will create all the devices in the group; running, for example, would make just the one device null.

It is possible to specify, instead of just std, something like std=foo. In this case, the stuff on the right-hand side of the equals sign specifies a name from /proc/devices, and the major number will be retrieved from there if present. If an entry from / proc/devices is specified, the explicit major number may be omitted. In this case, if the number is not found in /proc/ devices, attempts to create the device will be rejected.

Inside the braces is a list of specific devices. The name in parenthesis is the “class”; this is something specified in MAKEDEV.cfg that determines the ownership and permissions of the special file created. In the preceding example, the device mem was set to have the class kmem, but null was set to be public. Ordinarily, you’d define public to be mode 666 but kmem to be mode 660 and owned by group kmem. The number after the colon is the minor number for this particular device; for instance, 3 for null.

You may also specify a symbolic link with ->. For instance, core was made a link to /proc/kcore. Note that names may contain any characters, but names that contain things other than alphanumerics, dash, and underscore should be put in double quotes.

An entire range of devices can be created. You may specify a range of numbers in brackets:

tty[1-8] (tty) : 1

This creates tty1tty8 with minor device numbers starting with 1. If you specify the range in hex (prefixed by 0x), the device names will be created numbered in hex, as is normal for ptys. The range may appear inside the name string, but there may only be one range.

expire.ctl 1121

There is a special syntax for creating the entire banks of devices for a hard drive:

hd[a-d] 8/64

What this means is as follows: Create hda, and eight partitions on hda (hda1 through hda8), starting with minor number 0. Then create hdb, and eight partitions, starting with minor number 64. Then hdc, and so on, with minor number 64*2 = 128—and so forth. These are automatically placed in the class disk. The necessary groups and batches are created so you can ask MAKEDEV to create hd or hda or hda1 and expect it to do the correct thing.

Note that simple arithmetic is permitted for specifying the minor device number, as this often makes things much clearer and less likely to be accidentally broken.

SEE ALSO

MAKEDEV(8), MAKEDEV.cfg(5)

Version 1.4, January 1995

environ

environ—User environment.

SYNOPSIS

extern char **environ;

DESCRIPTION

An array of strings called the environment is made available by exec(2) when a process begins. By convention, these strings have the form name=value. Common examples are

USER

The name of the logged-in user (used by some BSD-derived programs).

LOGNAME

The name of the logged-in user (used by some System-V derived programs).

HOME

A user’s login directory, set by login(1) from the password file passwd(5).

LANG

The name of a locale to use for locale categories when not overridden by LC_ALL or more

 

specific environment variables.

PATH

The sequence of directory prefixes that sh(1) and many other programs apply in searching

 

for a file known by an incomplete pathname. The prefixes are separated by :.

SHELL

The filename of the user’s login shell.

TERM

The terminal type for which output is to be prepared.

Further names maybe placed in the environment by the export command and name=value in sh(1) or by the setenv command if you use csh(1). Arguments may also be placed in the environment at the point of an exec(2).

It is risky practice to set name=value pairs that conflict with well-known shell variables. Setting these could cause surprising behavior in subshells or system(3) commands.

SEE ALSO

login(1), sh(1), bash(1), csh(1), tcsh(1), exec(2), system(3)

Linux, 21 October 1996

expire.ctl

expire.ctl—Control file for Usenet article expiration.

 

Part V: File Formats

1122

 

 

 

DESCRIPTION

The file /news/lib/expire.ctl is the default control file for the expire(8) program, which reads it at startup. Blank lines and lines beginning with a number sign (#) are ignored. All other lines should be in one of two formats.

The first format specifies how long to keep a record of fully expired articles. This is useful when a newsfeed intermittently offers older news that is not kept around very long. (The case of very old news is handled by the –c flag of innd(8).) There should only be one line in this format, which looks like this:

/remember/:days

Where days is a floating-point number that specifies the upper limit to remember a Message-ID, even if the article has already expired. (It does not affect article expirations.)

Most of the lines in the file will consist of five colon-separated fields, as follows:

pattern:modflag:keep:default:purge

The pattern field is comma-separated set of single wildmat(3)-style patterns that specify the newsgroups to which the rest of the line applies. Because the file is interpreted in order, the most general patterns should be specified first, and the most specific patterns should be specified last.

The modflag field can be used to further limit newsgroups to which the line applies and should be chosen from the following set:

M

Only moderated groups

U

Only unmoderated groups

A

All groups

The next three fields are used to determine how long an article should be kept. Each field should be either a number of days (fractions such as 8.5 are allowed) or the word never. The most common use is to specify the default value for how long an article should be kept. The first and third fields—keep and purge—specify the boundaries within which an Expires header will be honored. They are ignored if an article has no Expires header. The fields are specified in the file as “lower-bound default upper-bound,” and they are explained in this order. Because most articles do not have explicit expiration dates, however, the second field tends to be the most important one.

The keep field specifies how many days an article should be kept before it will be removed. No article in the newsgroup will be removed if it has been filed for less than keep days, regardless of any expiration date. If this field is the word never, then an article cannot have been kept for enough days so it will never be expired.

The default field specifies how long to keep an article if no Expires header is present. If this field is the word never, then articles without explicit expiration dates will never be expired.

The purge field specifies the upper bound on how long an article can be kept. No article will be kept longer than the number of days specified by this field. All articles will be removed after they have been kept for purge days. If purge is the word never, then the article will never be deleted.

It is often useful to honor the expiration headers in articles, especially those in moderated groups. To do this, set keep to zero, default to whatever value you want, and purge to never. To ignore any Expires header, set all three fields to the same value.

There must be exactly one line with a pattern of * and a modflags of A; this matches all groups and is used to set the expiration default. It should be the first expiration line. For example:

##How long to keep expired history /remember/:5

##Most things stay for two weeks :A:14:14:14

##Believe expiration dates in moderated groups, up to six weeks :M:1:30:42

##Keep local stuff for a long time

foo.*:A:30:30:30

all_squash

exports 1123

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.

SEE ALSO

expire(8), wildmat(3)

exports

exports—NFS filesystems being exported.

SYNOPSIS

/etc/exports

DESCRIPTION

The file /etc/exports serves as the access control list for filesystems that can be exported to NFS clients. It is used by both the NFS mount daemon mountd(8) and the NFS file server daemon nfsd(8).

The file format is similar to the SunOS exports file, except that several additional options are permitted. Each line contains a mount point and a list of machine or netgroup names allowed to mount the filesystem at that point. An optional parenthesized list of mount parameters may follow each machine name. Blank lines are ignored, and a # introduces a comment to the end of the line.

GENERAL OPTIONS

secure

This option requires that requests originate on an Internet port less than IPPORT_RESERVED

 

(1024). This option is on by default. To turn it off, specify insecure.

ro

Allow only read-only requests on this NFS volume. The default is to allow write requests as

 

well, which can also be made explicit by using the rw option.

link_relative

Convert absolute symbolic links (where the link contents start with a slash) into relative

 

links by prepending the necessary number of ../s to get from the directory containing the

 

link to the root on the server. This has subtle, perhaps questionable, semantics when the file

 

hierarchy is not mounted at its root.

link_absolute

Leave all symbolic links as they are. This is the default operation.

USER ID MAPPING

nfsd bases its access control to files on the server machine on the UID and GID provided in each NFS RPC request. The normal behavior a user would expect is that she can access her files on the server just as she would on a normal filesystem. This requires that the same UIDs and GIDs are used on the client and the server machine. This is not always true, nor is it always desirable.

Very often, it is not desirable that the root user on a client machine is also treated as root when accessing files on the NFS server. To this end, UID 0 is normally mapped to a different ID: the so-called anonymous or nobody UID. This mode of operation (called root squashing) is the default and can be turned off with no_root_squash.

By default, nfsd tries to obtain the anonymous UID and GID by looking up user nobody in the password file at startup time. If it isn’t found, a UID and GID of -2 (65534) is used. These values can also be overridden by the anonuid and anongid options.

In addition to this, nfsd lets you specify arbitrary UIDs and GIDs that should be mapped to user nobody as well. Finally, you can map all user requests to the anonymous UID by specifying the option.

For the benefit of installations where UIDs differ between different machines, nfsd provides a way to dynamically map server UIDs to client UIDs and vice versa. This is enabled with the map daemon option and uses the UGID RPC protocol. For this to work, you have to run the ugidd(8) mapping daemon on the client host.

 

Part V: File Formats

1124

 

 

 

Here’s the complete list of mapping options:

root_squash

Map requests from UID/GID 0 to the anonymous UID/GID. Note that this does not

 

apply to any other UIDs that might be equally sensitive, such as user bin.

no_root_squash

Turn off root squashing. This option is mainly useful for diskless clients.

squash_uids and squash_gids

This option specifies a list of UIDs or GIDs that should be subject to anonymous mapping.

 

A valid list of IDs looks like this:

 

squash_uids=0-15,20,25-50

 

Usually, your squash lists will look a lot simpler, such as

 

squash_uids=0-100

all_squash

Map all UIDs and GIDs to the anonymous user. Useful for NFS-exported public FTP

 

directories, newsspool directories, and so on. The opposite option is no_all_squash, which is

 

the default setting.

map_daemon

This option turns on dynamic UID/GID mapping. Each UID in an NFS request will be

 

translated to the equivalent server UID, and each UID in an NFS reply will be mapped the

 

other way round. This option requires that rpc.ugidd(8) runs on the client host. The default

 

setting is map_identity, which leaves all UIDs untouched. The normal squash options apply

 

regardless of whether dynamic mapping is requested.

anonuid and anongid

These options explicitly set the UID and GID of the anonymous account. This option is

 

primarily useful for PC/NFS clients, where you might want all requests appear to be from

 

one user. As an example, consider the export entry for /home/joe in the section “Example,”

 

which maps all requests to UID 150 (which is supposedly that of user joe).

EXAMPLE

# sample /etc/exports file

/ master(rw) trusty(rw,no_root_squash) /projects proj*.local.domain(rw)

/usr *.local.domain(ro) @trusted(rw)

/home/joe pc001(rw,all_squash,anonuid=150,anongid=100) /pub (ro,insecure,all_squash)

The first line exports the entire filesystem to machines master and trusty. In addition to write access, all UID squashing is turned off for host trusty. The second and third entry show examples for wildcard hostnames and netgroups (this is the entry @trusted). The fourth line shows the entry for the PC/NFS client discussed previously. The last line exports the public FTP directory to every host in the world, executing all requests under the nobody account. The insecure option in this entry also allows clients with NFS implementations that don’t use a reserved port for NFS.

CAVEATS

Unlike other NFS server implementations, this nfsd allows you to export both a directory and a subdirectory thereof to the same host, for instance /usr and /usr/X11R6. In this case, the mount options of the most specific entry apply. For instance, when a user on the client host accesses a file in /usr/X11R6, the mount options given in the /usr/X11R6 entry apply. This is also true when the latter is a wildcard or netgroup entry.

FILES

/etc/exports

Configuration file for nfsd(8)

/etc/passwd

The password file

DIAGNOSTICS

 

An error parsing the file is reported using syslogd(8) as level NOTICE from a DAEMON whenever nfsd(8) or mountd(8) is started. Any unknown host is reported at that time, but often not all hosts are not yet known to named(8) at boot time, so as hosts are found, they are reported with the same syslogd(8) parameters.

filesystems 1125

SEE ALSO

mountd(8), nfsd(8), nfs(5), passwd(5)

21 October 1996

filesystems

filesystems—Linux filesystem types: minix, ext, ext2, xia, msdos, umsdos, vfat, proc, nfs, iso9660, hpfs, sysv, smb, ncpfs.

DESCRIPTION

In the file /proc/filesystems, you can find which filesystems your kernel currently supports. (If you need a currently unsupported one, insert the corresponding module or recompile the kernel.)

Following is a description of the various filesystems.

minix

The filesystem used in the Minix operating system, the first to run under Linux. It has a number

 

of shortcomings: a 64MB partition size limit, short filenames, a single time stamp, and so on. It

 

remains useful for floppies and RAM disks.

ext

An elaborate extension of the minix filesystem. It has been completely superseded by the second

 

version of the extended filesystem (ext2) and will eventually be removed from the kernel.

ext2

The high performance disk filesystem used by Linux for fixed disks as well as removable media.

 

The second extended filesystem was designed as an extension of the extended filesystem (ext).

 

ext2 offers the best performance (in terms of speed and CPU usage) of the filesystems supported

 

under Linux.

xiafs

Designed and implemented to be a stable, safe filesystem by extending the Minix filesystem code.

 

It provides the basic, most requested features without undue complexity. The xia filesystem is no

 

longer actively developed or maintained. It is used infrequently.

msdos

The filesystem used by DOS, Windows, and some OS/2 computers. msdos filenames can be no

 

longer than an eight-character name followed by an optional period and three-character

 

extension.

umsdos

An extended DOS filesystem used by Linux. It adds capability for long filenames, UID/GID,

 

POSIX permissions, and special files (devices, named pipes, and so on) under the DOS

 

filesystem, without sacrificing compatibility with DOS.

vfat

Extended DOS filesystem used by Microsoft Windows 95 and Windows NT. vfat adds

 

capability for long filenames under the MS-DOS filesystem.

proc

A pseudo-filesystem that is used as an interface to kernel data structures rather than reading and

 

interpreting /dev/kmem. In particular, its files do not take disk space. See proc(5).

iso9660

A CD-ROM filesystem type conforming to the ISO 9660 standard.

High Sierra

Linux supports High Sierra, the precursor to the ISO 9660 standard for CD-ROM filesystems. It

 

is automatically recognized within the iso9660 filesystem support under Linux.

Rock Ridge

Linux also supports the System Use Sharing Protocol records specified by the Rock Ridge

 

Interchange Protocol. They are used to further describe the files in the iso9660 filesystem to a

 

UNIX host and provides information such as long filenames, UID/GID, POSIX permissions,

 

and devices. It is automatically recognized within the iso9660 filesystem support under Linux.

hpfs

The High Performance Filesystem, used in OS/2. This filesystem is read-only under Linux due to

 

the lack of available documentation.

sysv

An implementation of the SystemV/Coherent filesystem for Linux. It implements all Xenix FS,

 

SystemV/386 FS, and Coherent FS.

nfs

The network filesystem used to access disks located on remote computers.

 

Part V: File Formats

1126

 

 

 

smb

A network filesystem that supports the SMB protocol, used by Windows for Workgroups,

 

Windows NT, and LAN Manager.

 

To use smb, you need a special mount program, which can be found in the ksmbfs package at

 

ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/smbfs.

ncpfs

A network filesystem that supports the NCP protocol, used by Novell NetWare.

 

To use ncpfs, you need special programs found at ftp://linux01.gwdg.de/pub/ncpfs.

SEE ALSO

 

proc(5), fsck(8), mkfs(8), mount(8)

25 March 1996

fstab

fstab—Static information about the filesystems.

SYNOPSIS

#include <fstab.h>

DESCRIPTION

The file fstab contains descriptive information about the various filesystems. fstab is only read by programs and not written; it is the duty of the system administrator to properly create and maintain this file. Each filesystem is described on a separate line; fields on each line are separated by tabs or spaces. The order of records in fstab is important because fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing.

The first field (fs_spec) describes the block special device or remote filesystem to be mounted.

The second field (fs_file) describes the mount point for the filesystem. For swap partitions, this field should be specified as none.

The third field (fs_vfstype) describes the type of the filesystem. The system currently supports three types of filesystems:

minix

A local filesystem, supporting filenames of length 14 or 30 characters.

ext

A local filesystem with longer filenames and larger inodes. This filesystem has been replaced

 

by the ext2 filesystem and should no longer be used.

ext2

A local filesystem with longer filenames, larger inodes, and a lot of other features.

xiafs

A local filesystem with longer filenames, larger inodes, and a lot of other features.

msdos

A local filesystem for MS-DOS partitions.

hpfs

A local filesystem for HPFS partitions.

iso9660

A local filesystem used for CD-ROM drives.

nfs

A filesystem for mounting partitions from remote systems.

swap

A disk partition to be used for swapping.

If vfs_fstype is specified as ignore, the entry is ignored. This is useful to show disk partitions that are currently unused.

The fourth field (fs_mntops) describes the mount options associated with the filesystem.

It is formatted as a comma-separated list of options. It contains at least the type of mount plus any additional options appropriate to the filesystem type. For documentation on the available options for non-NFS file systems, see mount(8). For documentation on all NFS-specific options, take a look at nfs(5). Common for all types of filesystems are the options noauto (do not mount when mount -a is given, such as at boot time) and user (allow a user to mount). For more details, see mount(8).

The fifth field (fs_freq) is used for these filesystems by the dump(8) command to determine which filesystems need to be dumped. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be dumped.

groff_font 1127

The sixth field (fs_passno) is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.

The proper way to read records from fstab is to use the routine getmntent(3).

FILES

/etc/fstab

BUGS

The documentation in mount(8) is often more up-to-date.

SEE ALSO

getmntent(3), mount(8), swapon(8), nfs(5)

HISTORY

The fstab file format appeared in 4.0 BSD.

Linux 0.99, 27 November 1993

groff_font

groff_font—Format of groff device and font description files.

DESCRIPTION

The groff_font format is roughly a superset of the ditroff font format. Unlike the ditroff font format, there is no associated binary format. The font files for device name are stored in a directory devname. There are two types of file: a device description file called DESC and for each font F, a font file called F. These are text files; there is no associated binary format.

DESC FILE FORMAT

The DESC file can contain the following types of lines:

res n

There are n machine units per inch.

hor n

The horizontal resolution is n machine units.

vert n

The vertical resolution is n machine units.

sizescale n

The scale factor for point sizes. By default, this has a value of 1. One scaled point is

 

equal to one point/n. The arguments to the unitwidth and sizes commands are

 

given in scaled points.

unitwidth n

Quantities in the font files are given in machine units for fonts whose point size is n

 

scaled points.

tcommand

This means that the postprocessor can handle the t and u output commands.

sizes s1 s2 ... sn0

This means that the device has fonts at s1, s2,…sn scaled points. The list of sizes

 

must be terminated by a 0. Each si can also be a range of sizes mn. The list can

 

extend over more than one line.

styles S1 S2 ... Sm

The first m font positions will be associated with styles S1Sm.

fonts n F1 F2 F3 ... Fn

Fonts F1Fn will be mounted in the font positions m+1,…,m+n where m is the

 

number of styles. This command may extend over more than one line. A font name

 

of 0 will cause no font to be mounted on the corresponding font position.

 

Part V: File Formats

1128

 

 

 

family fam

The default font family is fam.

charset

This line and everything following in the file are ignored. It is allowed for the sake of

 

backwards compatibility.

The res, unitwidth, fonts, and sizes lines are compulsory. Other commands are ignored by troff but may be used by postprocessors to store arbitrary information about the device in the DESC file.

FONT FILE FORMAT

A font file has two sections. The first section is a sequence of lines, each containing a sequence of blank delimited words; the first word in the line is a key, and subsequent words give a value for that key.

name F

The name of the font is F.

spacewidth n

The normal width of a space is n.

slant n

The characters of the font have a slant of n degrees. (Positive means forward.)

ligatures lig1 lig2 ... lign [0]

Characters lig1, lig2,…,lign are ligatures; possible ligatures are ff, fi, fl, and ffl.

 

For backwards compatibility, the list of ligatures may be terminated with a 0. The

 

list of ligatures may not extend over more than one line.

special

The font is special; this means that when a character is requested that is not present

 

in the current font, it will be searched for in any special fonts that are mounted.

Other commands are ignored by troff but may be used by postprocessors to store arbitrary information about the font in the font file.

The first section can contain comments, which start with the # character and extend to the end of a line.

The second section contains one or two subsections. It must contain a charset subsection and it may also contain a kernpairs subsection. These subsections can appear in any order. Each subsection starts with a word on a line by itself.

The word charset starts the charset subsection. The charset line is followed by a sequence of lines. Each line gives information for one character. A line comprises a number of fields separated by blanks or tabs. The format is

name metrics type code comment

name identifies the character: if name is a single character c, it corresponds to the groff input character c; if it is of the form \c where c is a single character, then it corresponds to the groff input character nc; otherwise, it corresponds to the groff input character \[name] (if it is exactly two characters xx, it can be entered as \(xx). groff supports eight-bit characters; however, some utilities have difficulties with eight-bit characters. For this reason, there is a convention that the name charn is equivalent to the single character whose code is n. For example, char163 is equivalent to the character with code 163, which is the pounds sterling sign in ISO Latin-1. The name — is special and indicates that the character is unnamed; such characters can only be used by means of the \N escape sequence in troff.

The type field gives the character type:

1

The character has an descender, such as p.

2

The character has an ascender, such as b.

3

The character has both an ascender and a descender, such as (.

The code field gives the code that the postprocessor uses to print the character. The character can also be input to groff using this code by means of the \N escape sequence. The code can be any integer. If it starts with a 0, it will be interpreted as octal; if it starts with 0x or 0X, it will be interpreted as hexadecimal.

Anything on the line after the code field will be ignored.

The metrics field has the form:

width[,height[,depth[,italic_correction[,left_italic_correction

[,subscript_correction]]]]]

There must not be any spaces between these subfields. Missing subfields are assumed to be 0. The subfields are all decimal integers. Because there is no associated binary format, these values are not required to fit into a variable of type char as they

groff_out 1129

are in ditroff. The width subfields gives the width of the character. The height subfield gives the height of the character (upwards is positive); if a character does not extend above the baseline, it should be given a zero height, rather than a negative height. The depth subfield gives the depth of the character, that is, the distance below the lowest point below the baseline to which the character extends (downwards is positive); if a character does not extend below above the baseline, it should be given a zero depth, rather than a negative depth. The italic_correction subfield gives the amount of space that should be added after the character when it is immediately to be followed by a character from a roman font. The left_italic_correction subfield gives the amount of space that should be added before the character when it is immediately to be preceded by a character from a roman font. The subscript_correction gives the amount of space that should be added after a character before adding a subscript. This should be less than the italic_correction.

A line in the charset section can also have the format

name

This indicates that name is just another name for the character mentioned in the preceding line.

The word kernpairs starts the kernpairs section. This contains a sequence of lines of the form:

c1 c2 n

This means that when character c1 appears next to character c2, the space between them should be increased by n. Most entries in kernpairs section will have a negative value for n.

FILES

/usr/lib/groff/font/dev name/DESC

Device description file for device name.

/usr/lib/groff/font/devname/F

Font file for font F of device name.

SEE ALSO

groff_out(5), gtroff(1)

Groff Version 1.09, 14 February 1994

groff_out

groff_outgroff intermediate output format.

DESCRIPTION

This manual page describes the format output by GNU troff. The output format used by GNU troff is very similar to that used by UNIX device-independent troff. Only the differences are documented here.

The argument to the s command is in scaled points (units of points/n, where n is the argument to the sizescale command in the DESC file.) The argument to the x Height command is also in scaled points.

The first three output commands are guaranteed to be

x T device x res n h v x init

If the tcommand line is present in the DESC file, troff will use the following two commands:

txxx

xxx is any sequence of characters terminated by a space or a newline; the first

 

character should be printed at the current position, the current horizontal position

 

should be increased by the width of the first character, and so on for each character.

 

The width of the character is that given in the font file, appropriately scaled for the

 

current point size and rounded so that it is a multiple of the horizontal resolution.

 

Special characters cannot be printed using this command.

 

Part V: File Formats

1130

 

 

 

unxxx

This is same as the t command except that after printing each character, the current

 

horizontal position is increased by the sum of the width of that character and n.

Note that single characters can have the eighth bit set, as can the names of fonts and special characters.

The names of characters and fonts can be of arbitrary length; drivers should not assume that they will be only two characters long.

When a character is to be printed, that character will always be in the current font. Unlike device-independent troff, it is not necessary for drivers to search special fonts to find a character.

The D drawing command has been extended. These extensions will not be used by GNU pic if the –n option is given.

Df n\n

Set the shade of gray to be used for filling solid objects to n; n must be an integer

 

between 0 and 1000, where 0 corresponds to solid white and 1000 to solid black and

 

values in between correspond to intermediate shades of gray. This applies only to

 

solid circles, solid ellipses, and solid polygons. By default, a level of 1000 will be

 

used. Whatever color a solid object has, it should completely obscure everything

 

beneath it. A value greater than 1000 or less than 0 can also be used: This means fill

 

with the shade of gray that is currently being used for lines and text. Normally, this

 

will be black, but some drivers may provide a way of changing this.

DC d\n

Draw a solid circle with a diameter of d with the leftmost point at the current

 

position.

DE dx dy\n

Draw a solid ellipse with a horizontal diameter of dx and a vertical diameter of dy

 

with the leftmost point at the current position.

Dp dx1 dy1 dx2 dy2 ... dxn dyn\n

Draw a polygon with, for i = 1, ..., n+1, the ith vertex at the current position +

 

åi f=11 (dxj, dyj). At the moment, GNU pic only uses this command to generate

 

triangles and rectangles.

DP dx1 dy1 dx2 dy2 ... dxn dyn\n

Like Dp, but draw a solid rather than outlined polygon.

Dt n\n

Set the current line thickness to n machine units. Traditionally, UNIX troff drivers

 

use a line thickness proportional to the current point size; drivers should continue to

 

do this if no Dt command has been given or if a Dt command has been given with a

 

negative value of n. A zero value of n selects the smallest available line thickness.

A difficulty arises in how the current position should be changed after the execution of these commands. This is not of great importance because the code generated by GNU pic does not depend on this. Given a drawing command of the form

\Dc x1 y1 x2 y2 ... xn yn

where c is not one of c, e, l, a, or ~, UNIX troff will treat each of the xi as a horizontal quantity and each of the yi as a vertical quantity and will assume that the width of the drawn object is å ni=1 xi and that the height is å ni=1 yi. (The assumption about the height can be seen by examining the st and sb registers after using such a D command in a \w escape sequence.) This rule also holds for all the original drawing commands with the exception of De. For the sake of compatibility, GNU troff also follows this rule, even though it produces an ugly result in the case of the Df, Dt, and, to a lesser extent, DE commands. Thus after executing a D command of the form

Dc x1 y1 x2 y2 ... xn yn\n

the current position should be increased by (å ni=1 xi; å ni=1 yi).

A continuation convention permits the argument to the x X command to contain newlines: when outputting the argument to the x X command, GNU troff will follow each newline in the argument with a + character (as usual, it will terminate the entire argument with a newline); thus if the line after the line containing the x X command starts with +, then the newline ending the line containing the x X command should be treated as part of the argument to the x X command, the + should be ignored, and the part of the line following the + should be treated like the part of the line following the x X command.

history 1131

SEE ALSO

groff_font(5)

groff version 1.09, 14 February 1994

group

group—User group file.

DESCRIPTION

/etc/group is an ASCII file that defines the groups to which users belong. There is one entry per line, and each line has the format

group_name:passwd:GID:user_list

The field descriptions are

 

group_name

The name of the group.

passwd

The (encrypted) group password. If this field is empty, no password is needed.

GID

The numerical group ID.

user_list

All the group member’s usernames, separated by commas.

FILES

/etc/group

SEE ALSO

login(1), newgrp(1), passwd(5)

Linux, 29 December 1992

history

history—Record of current and recently expired Usenet articles.

DESCRIPTION

The file /news/lib/history keeps a record of all articles currently stored in the news system, as well as those that have been received but since expired.

The file consists of text lines. Each line corresponds to one article. The file is normally kept sorted in the order in which articles are received, although this is not a requirement. innd(8) appends a new line each time it files an article, and expire(8) builds a new version of the file by removing old articles and purging old entries.

Each line consists of two or three fields separated by a tab, shown below as \t:

<Message–ID>\t date <Message–ID>\t date \t files

The Message–ID field is the value of the article’s Message-ID header, including the angle brackets.

The date field consists of three subfields separated by a tilde. All subfields are the text representation of the number of seconds since the epoch—a time_t; see gettimeofday(2). The first subfield is the article’s arrival date. If copies of the article are still present, then the second subfield is either the value of the article’s Expires header or a hyphen if no expiration date was specified. If an article has been expired, the second subfield will be a hyphen. The third subfield is the value of the article’s Date header, recording when the article was posted.

 

Part V: File Formats

1132

 

 

 

The files field is a set of entries separated by one or more spaces. Each entry consists of the name of the newsgroup, a slash, and the article number. This field is empty if the article has been expired.

For example, an article cross-posted to comp.sources.unix and comp.sources.d that was posted on February 10, 1991, (and received three minutes later) with an expiration date of May 5, 1991, could have a history line (broken into two lines for display) like the following:

<312@litchi.foo.com> \t 666162000˜673329600˜666162180 \t comp.sources.unix/1104 comp.sources.d/7056

In addition to the text file, there is a dbz(3z) database associated with the file that uses the Message-ID field as a key to determine the offset in the text file where the associated line begins. For historical reasons, the key includes the trailing \0 byte (which is not stored in the text file).

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.

SEE ALSO

dbz(3z), expire(8), innd(8), news-recovery(8)

hosts.nntp, hosts.nntp.nolimit

hosts.nntp, hosts.nntp.nolimit—List of hosts that feed NNTP news.

DESCRIPTION

The file /news/lib/hosts.nntp is read by innd(8) to get the list of hosts that feed the local site Usenet news using the NNTP protocol. The server reads this file at startup or when directed to by ctlinnd(8). When a hosts connects to the NNTP port of the system on which innd is running, the server will do a check to see if their Internet address is the same as one of the hosts named in this file. If the host is not mentioned, then innd will spawn an nnrpd(8) to process the connection, with the accepted connection on standard input and standard output.

Comments begin with a number sign (#) and continue through the end of the line. Blank lines and comments are also ignored. All other lines should consist of two or three fields separated by a colon.

The first field should be either an Internet address in dotted-quad format or an address that can be parsed by gethostbyname(3). If a host’s entry has multiple addresses, all of them will be added to the access list. The second field, which may be blank, is the password the foreign host is required to use when first connecting. The third field, which may be omitted, is a list of newsgroups to which the host may post articles. This list is parsed as a newsfeeds(5) subscription list; groups not in the list are ignored.

Because innd is usually started at system boot time, the local nameserver may not be fully operational when innd parses this file. As a work-around, a ctlinnd reload command can be performed after a delay of an hour or so. It is also possible to provide both a host’s name and its dotted-quad address in the file.

For example:

##FOO has a password, UUNET doesn’t.

##UUNET cannot post to local groups.

##These are comment lines. news.foo.com:magic uunet.uu.net::!foo.*

If the file contains passwords, it should not be world-readable. The file /news/lib/hosts.nntp.nolimit, if it exists, is read whenever the hosts.nntp file is read. It has the same format, although only the first field is used. Any host mentioned in this file is not subject to the incoming connections limit specified by innd’s –c flag. This can be used to allow local hosts or timesensitive peers to connect regardless of the local conditions.

hosts_access 1133

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.

SEE ALSO

ctlinnd(8), innd(8), nnrpd(8)

hosts_access

hosts_access—Format of host access control files.

DESCRIPTION

This manual page describes a simple access control language that is based on client (hostname/address, username) and server (process name) patterns. Examples are given at the end. The impatient reader can skip to the “Examples” section for a quick introduction.

In the following text, daemon is the process name of a network daemon process, and client is the name or address of a host requesting service. Network daemon process names are specified in the inetd configuration file.

ACCESS CONTROL FILES

The access control software consults two files. The search stops at the first match:

Access will be granted when a (daemon,client) pair matches an entry in the /etc/hosts.allow file.

Otherwise, access will be denied when a (daemon,client) pair matches an entry in the /etc/hosts.deny file.

Otherwise, access will be granted.

A non-existing access control file is treated as if it were an empty file. Thus, access control can be turned off by providing no access control files.

ACCESS CONTROL RULES

Each access control file consists of zero or more lines of text. These lines are processed in order of appearance. The search terminates when a match is found.

A newline character is ignored when it is preceded by a backslash character.

Blank lines or lines that begin with a # character are ignored.

All other lines should satisfy the following format, things between [] being optional:

daemon_list : client_list [ : shell_command ]

daemon_list is a list of one or more daemon process names (argv[0] values) or wildcards.

client_list is a list of one or more hostnames, host addresses, patterns, or wildcards that will be matched against the remote hostname or address.

List elements should be separated by blanks or commas.

With the exception of NIS (YP) netgroup lookups, all access control checks are case insensitive.

PATTERNS

The access control language implements the following patterns:

A string that begins with a . character: A client name or address is matched if its last components match the specified pattern. For example, the pattern .tue.nl matches the hostname wzv.win.tue.nl.

A string that ends with a . character: A client name or address is matched if its first fields match the given string. For example, the pattern 131.155. matches the address of (almost) every host on the Eindhoven University network (131.155.x.x).

 

Part V: File Formats

1134

 

 

 

A string that begins with a @ character is treated as a netgroup name: Netgroups are usually supported on systems with NIS (formerly YP) databases. A client hostname is matched if it is a (host) member of the specified netgroup.

An expression of the form n.n.n.n/m.m.m.m is interpreted as a net/mask pair. A client address is matched if net is equal to the bitwise AND of the address and the mask. For example, the net/mask pattern 131.155.72.0/255.255.254.0 matches every address in the range 131.155.72.0 through 131.155.73.255.

WILDCARDS

The access control language supports explicit wildcards:

ALL

If this token appears in a daemon list, it matches all network daemon process names. If the ALL

 

token appears in a client list, it matches all client names and addresses.

LOCAL

Matches any string that does not contain a dot character. Typical use is in client lists.

UNKNOWN

Matches any host whose name or address are unknown. Should be used with care: Hostnames

 

may be unavailable due to temporary nameserver problems. A network address will be

 

unavailable when the software cannot figure out what type of network it is talking to.

KNOWN

Matches any host whose name and address are known. Should be used with care: Hostnames

 

may be unavailable due to temporary nameserver problems. A network address will be

 

unavailable when the software cannot figure out what type of network it is talking to.

FAIL

Like the ALL wildcard but causes the software to pretend that the scan of the current access

 

control table fails. FAIL is being phased out; it will become an undocumented feature. The

 

EXCEPT operator is a much cleaner alternative.

OPERATORS

EXCEPT

Intended use is of the form: list_1 EXCEPT list_2; this construct matches anything that

 

matches list_1 unless it matches list_2. This construct can be used in daemon lists and in

 

client lists. The EXCEPT operator can be nested: If the control language would permit the use

 

of parentheses, a EXCEPT b EXCEPT c would parse as (a EXCEPT (b EXCEPT c)).

SHELL COMMANDS

If the first-matched access control rule contains a shell command, that command is subjected to the following substitutions:

%a

Expands to the remote host address.

%c

Expands to client information: user@host, user@address, a hostname, or just an address,

 

depending on how much information is available.

%h

Expands to the remote hostname (or address, if the hostname is unavailable).

%d

Expands to the daemon process name (argv[0] value).

%p

Expands to the daemon process ID.

%u

Expands to the remote username (or unknown).

%%

Expands to a single % character.

Characters in % expansions that may confuse the shell are replaced by underscores. The result is executed by a /bin/sh child process with standard input, output, and error connected to /dev/null. Specify an & at the end of the command if you do not want to wait until it has completed.

Shell commands should not rely on the PATH setting of the inetd. Instead, they should use absolute pathnames, or they should begin with an explicit PATH=whatever statement.

REMOTE USERNAME LOOKUP

When the client host supports the RFC 931 protocol or one of its descendants (TAP, IDENT) the wrapper programs can retrieve additional information about the owner of a connection. When available, remote username information is logged together with the client hostname and can be used to match patterns like

daemon_list : ... user_pattern@host_pattern ...

daemon_list
host_pattern

The daemon wrappers can be configured interrogate the client host. In the case of only when both the and the

hosts_access 1135

at compile time to perform rule-driven username lookups (default) or to always rule-driven username lookups, the preceding rule would cause username lookup

match.

A user pattern has the same syntax as a daemon process name, hostname, or host address pattern, so the same wildcards and so on apply (but netgroup membership of users is not supported). One should not get carried away with username lookups, however.

The remote username information cannot be trusted when it is needed most—that is, when the remote system has been compromised. In general, ALL and (UN)KNOWN are the only username patterns that make sense.

Username lookups are possible only with TCP-based services and only when the client host runs a suitable daemon; in all other cases the result is unknown.

A well-known UNIX kernel bug may cause loss of service when username lookups are blocked by a firewall. The wrapper README document describes a procedure to find out if your kernel has this bug.

Username lookups cause noticeable delays for PC users. The default time-out for username lookups is ten seconds: too short to cope with slow networks but long enough to irritate PC users.

Selective username lookups can alleviate the last problem. For example, a rule like

daemon_list : @pcnetgroup ALL@ALL

would match members of the pcnetgroup without doing username lookups but would perform username lookups with all other systems.

EXAMPLES

The language is flexible enough that different types of access control policy can be expressed with a minimum of fuss. Although the language uses two access control tables, the most common policies can be implemented with one of the tables being trivial or even empty.

When reading the following examples, it is important to realize that the allow table is scanned before the deny table, that the search terminates when a match is found, and that access is granted when no match is found at all.

The examples use host and domain names. They can be improved by including address or network/netmask information to reduce the impact of temporary nameserver lookup failures.

MOSTLY CLOSED

In this case, access is denied by default. Only explicitly authorized hosts are permitted access.

The default policy (no access) is implemented with a trivial deny file:

/etc/hosts.deny:

ALL: ALL

This denies all service to all hosts, unless they are permitted access by entries in the allow file.

The explicitly authorized hosts are listed in the allow file:

/etc/hosts.allow:

ALL: LOCAL @some_netgroup

ALL: .foobar.edu EXCEPT terminalserver.foobar.edu

The first rule permits access to all services from hosts in the local domain (no . in the hostname) and from members of the some_netgroup netgroup. The second rule permits access to all services from all hosts in the .foobar.edu domain, with the exception of terminalserver.foobar.edu.

MOSTLY OPEN

Here, access is granted by default; only explicitly specified hosts are refused service.

 

Part V: File Formats

1136

 

 

 

The default policy (access granted) makes the allow file redundant so that it can be omitted. The explicitly non-authorized hosts are listed in the deny file:

/etc/hosts.deny:

ALL: some.host.name, .some.domain

ALL EXCEPT in.fingerd: other.host.name, .other.domain

The first rule denies some hosts all services; the second rule still permits finger requests from other hosts.

BOOBY TRAPS

The next example permits tftp requests from hosts in the local domain. Requests from any other hosts are denied. Instead of the requested file, a finger probe is sent to the offending host. The result is mailed to the superuser.

/etc/hosts.allow:

in.tftpd: LOCAL, .my.domain /etc/hosts.deny:

in.tftpd: ALL: (/some/where/safe_finger -l @%h | \ /usr/ucb/mail -s %d-%h root) &

The safe_finger command comes with the tcpd wrapper and should be installed in a suitable place. It limits possible damage from data sent by the remote finger server. It gives better protection than the standard finger command.

The expansion of the %h (remote host) and %d (service name) sequences is described in the section on shell commands.

Warning: Do not booby-trap your finger daemon, unless you are prepared for infinite finger loops.

On network firewall systems, this trick can be carried even further. The typical network firewall only provides a limited set of services to the outer world. All other services can be “bugged” just like the preceding tftp example. The result is an excellent early-warning system.

DIAGNOSTICS

An error is reported when a syntax error is found in a host access control rule, when the length of an access control rule exceeds the capacity of an internal buffer, when an access control rule is not terminated by a newline character, when the result of %<character> expansion would overflow an internal buffer, and when a system call fails that shouldn’t. All problems are reported via the syslog daemon.

FILES

/etc/hosts.allow, (daemon,client) pairs that are granted access.

/etc/hosts.deny, (daemon,client) pairs that are denied access.

SEE ALSO

tcpd(8), TCP/IP daemon wrapper program

BUGS

If a nameserver lookup times out, the hostname will not be available to the access control software, even though the host is registered.

Domain nameserver lookups are case insensitive; NIS (formerly YP) netgroup lookups are case sensitive.

AUTHOR

Wietse Venema (wietse@wzv.win.tue.nl), Department of Mathematics and Computing Science, Eindhoven University of Technology, Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands.

hosts_options 1137

hosts_options

hosts_options—Host access control language extensions.

DESCRIPTION

This document describes optional extensions to the language described in the hosts_access(5) document. The extensions are enabled at program build time by editing the makefile.

The extensible language uses the following format:

daemon_list : client_list : option : option ...

The first two fields are described in the hosts_access(5) manual page. The remainder of the rules is a list of zero or more options. Any : characters within options should be protected with a backslash.

An option is of the form keyword or keyword = value. Options are processed in the specified order. With some options, the value is subjected to %<character> substitutions.

OPTIONS

severity = mail.info

Change the severity level at which the event will be logged. Facility names (such as

 

mail) are optional and are not supported on systems with older syslog implementa-

 

tions. The severity option can be used to emphasize or to completely ignore specific

 

events.

allow (deny)

Grant (deny) service, even when the matched rule was found in the hosts.deny

 

(hosts.allow) file. These options must appear at the end of a rule.

With the allow and deny keywords, it is possible to keep all access control rules within a single file—for example, in the hosts.allow file:

ALL: .friendly.domain: allow

ALL: ALL: deny

This permits access from specific hosts only. On the other hand,

ALL: .trouble.makers: deny

ALL: ALL: allow

This permits access from all hosts except a few troublemakers.

 

twist = shell_command

Replace the current process by an instance of the

 

specified shell command, after performing the

 

%<character> expansions described in the

 

hosts_access(5) manual page. stdin, stdout, and

 

stderr are connected to the remote client process.

 

This option must appear at the end of a rule.

 

Examples:

in.ftpd : ... : twist = /bin/echo 421

Some bounce message sends a customized bounce message to the remote client instead of running the real FTP daemon.

in.telnetd : ... : twist = PATH=/some/other; exec in.telnetd

Runs /some/other/in.telnetd without polluting its

 

command-line array or its process environment.

 

Warning: In case of UDP services, do not twist into

 

commands that use the standard I/O or the

 

read(2)/write(2) routines to communicate with the

 

client process; UDP requires other I/O primitives.

spawn = shell_command

Execute the shell command in a child process, after

 

performing the %<character> expansions described

 

in the hosts_access(5) manual page. The command

 

Part V: File Formats

1138

 

 

is executed with stdin, stdout, and stderr

 

 

connected to the null device so that it won’t mess

 

up the conversation with the remote host. Example:

spawn = (/some/where/safe_finger -l @%h | /usr/ucb/mail root) &

Executes, in a background child process, the shell

 

command safe_finger -l @%h | mail root after

 

replacing %h by the name or address of the remote

 

host.

 

The example uses the safe_finger command

 

instead of the regular finger command to limit

 

possible damage from data sent by the finger server.

 

The safe_finger command is part of the daemon

 

wrapper package; it is a wrapper around the regular

 

finger command that filters the data sent by the

 

remote host.

umask = 022

Like the umask command that is built into the shell.

 

An umask of 022 prevents the creation of files with

 

group and world write permission. The umask

 

argument should be an octal number.

keepalive

Causes the server to periodically send a message to

 

the client. The connection is considered broken

 

when the client does not respond. The keepalive

 

option can be useful when users turn off their

 

machine while it is still connected to a server. The

 

keepalive option is not useful for datagram (UDP)

 

services.

linger = number_of_seconds

Specifies how long the kernel will try to deliver notyet delivered data after the server process closes a connection.

nice = niceval

 

nice (no argument)

Change the nice value of the process (default 10).

 

Specify a positive value to spend more CPU

 

resources on other processes.

user = nobody

Assume the privileges of the nobody account. This is

 

useful with inetd implementations that run all

 

services with root privilege. It is good practice to

 

run services such as finger at a reduced privilege

 

level.

group = tty

Assume the privileges of the tty group. This is

 

useful mostly in combination with the user option.

 

In order to switch both user and group IDs, switch

 

group ID before switching user ID.

setenv = name value

Place a (name, value) pair into the process environ-

 

ment. The value is subjected to %<character>

 

expansions and may contain whitespace (but

 

leading and trailing blanks are stripped off).

 

Warning: Many network daemons reset their

 

environment before spawning a login or shell

 

process.

 

inittab

 

 

 

 

1139

 

 

 

rfc931 = timeout_in_seconds

 

 

 

 

 

 

rfc931 (no argument)

Look up the remote user name with the RFC 931

 

 

(ident and so on) protocol. This option is silently

 

 

ignored in case of services based on transports other

 

than TCP. It requires that the client system runs an

 

RFC 931 (ident and so on) compliant daemon and

 

may cause noticeable delays with connections from

non-UNIX hosts. The time-out period is optional. If no time-out is specified, a default value is taken.

DIAGNOSTICS

When a syntax error is found in an access control rule, the error is reported to the syslog daemon; further options will be ignored, and service is denied.

SEE ALSO

hosts_access(5), the default access control language

AUTHOR

Wietse Venema (wietse@wzv.win.tue.nl), Department of Mathematics and Computing Science, Eindhoven University of Technology, Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands.

inittab

inittab—Format of the inittab file used by the SysV-compatible init process.

DESCRIPTION

The inittab file describes which processes are started at bootup and during normal operation (such as /etc/rc, gettys). init distinguishes multiple run levels, of which each can have its own set of processes that are started. Valid runlevels are 06 and A, B, and C for ondemand entries. An entry in the inittab file has the following format:

id:runlevels:action:process

Lines beginning with # are ignored.

id

A unique two-character-sequence which identifies an entry in inittab.

 

Note: For gettys or other login processes, the id field should be the tty suffix of the

 

corresponding tty, such as 1 for tty1. Otherwise, the login accounting will not work

 

correctly. This is a bug in login and will be fixed.

runlevels

Describes in which run levels the specified action should be taken.

action

Describes which action should be taken.

process

Specifies the process to be executed. If the process field starts with a + character, init will

 

not do utmp and wtmp accounting for that process. This is needed for gettys that insist on

 

doing their own utmp/wtmp housekeeping. This is also a historic bug.

Valid actions are

 

respawn

The process will be restarted whenever it terminates (such as getty).

wait

The process will be started once when the specified run level is entered and init will wait

 

for its termination.

once

The process will be executed once when the specified run level is entered.

boot

The process will be executed during system boot. The run level field is ignored.

 

Part V: File Formats

1140

 

 

 

bootwait

The process will be executed during system boot while init waits for its termination (such

 

as /etc/rc). The runlevel field is ignored.

off

This does nothing.

ondemand

A process marked with ondemand will be executed whenever the specified ondemand run level

 

is called. However, no runlevel change will occur.

initdefault

An initdefault-entry specifies the run level that should be entered after system boot. If

 

none exists, init will ask for a runlevel on the console.

sysinit

The process will be executed during system boot. It will be executed before any boot or

 

bootwait entries.

powerwait

The process will be executed when init receives the SIGPWR signal, indicating that there is

 

something wrong with the power. init will wait for the process to finish before continuing.

powerfail

As powerwait but init will not wait for the processes completion.

powerokwait

The process will be executed when init receives the SIGPWR signal, provided there is a file

 

called /etc/powerstatus containing the word OK. This means that the power has come back

 

again.

ctrlaltdel

The process will be executed when init receives the SIGINT signal. This means that someone

 

on the system console pressed the Ctrl+Alt+Del key combination. Typically, one wants to

 

execute some sort of shutdown either to get into single–user level or to reboot the machine.

The runlevel field may contain multiple characters for different run levels, such as 123 if the process should be started in run levels 1, 2 and 3. Ondemand entries may contain an A, B, or C. The runlevel field of sysinit, boot, and bootwait entries are ignored.

When the run level is changed, any running processes that are not specified for the new run level are killed, first with SIGTERM and then with SIGKILL.

EXAMPLES

This is an example of an inittab that resembles the old Linux inittab:

# inittab for linux id:1:initdefault: rc::bootwait:/etc/rc 1:1:respawn:/etc/getty 9600 tty1 2:1:respawn:/etc/getty 9600 tty2 3:1:respawn:/etc/getty 9600 tty3 4:1:respawn:/etc/getty 9600 tty4

This inittab file executes /etc/rc during boot and starts gettys on tty1tty4.

A more elaborate inittab with different run levels (see the comments inside) is

#Level to run in id:4:initdefault: ud::boot:/etc/update rc::bootwait:/etc/rc cr::boot:/etc/crond

#

#level 1: getty on tty1

#level 2: getty on tty1-4

#level 3: tty1-4, dialin via modem(ttys2)

#level 4: tty1-4, ttyb

#

mr:126:once:/usr/bin/nodialin

mi:345:once:/usr/bin/dialin 1:1234:respawn:/etc/getty 9600 tty1 2:234:respawn:/etc/getty 9600 tty2 3:234:respawn:/etc/getty 9600 tty3

inn.conf 1141

4:234:respawn:/etc/getty 9600 tty4 s2:3:respawn:/etc/mgetty ttys2 19200 b:4:respawn:/etc/getty 19200L ttyb ca::ctrlaltdel:/etc/shutdown -t3 -rf now

FILES

/etc/inittab

AUTHOR

init was written by Miquel van Smoorenburg (miquels@drinkel.nl.mugnet.org). The manual page was written by Sebastian Lederer (lederer@francium.informatik.uni-bonn.de) and modified by Michael Haardt (u31b3hs@pool.informatik.rwthaachen.de).

SEE ALSO

init(8), telinit(8)

13 May 1993

inn.conf

inn.conf—Configuration data for InterNetNews programs.

DESCRIPTION

The file /news/lib/inn.conf is used to determine various parameters. Blank lines and lines starting with a number sign (#) are ignored. All other lines specify parameters that may be read and should be of the following form:

name : [optional whitespace] value

Everything after the whitespace and up to the end of the line is taken as the value; multi-word values should not be put in quotes. The case of names is significant; server is not the same as Server or SERVER.

Some parameters specified in the file may be overridden by environment variables, and some file parameters may be used to mask real data, such as when hiding a cluster of hosts behind a single electronic mail hostname. The current set of parameters is as follows:

fromhost

This is the name of the host to use when building the From header line. The default is the

 

fully qualified domain name of the local host. The value of the FROMHOST environment

 

variable, if it exists, overrides this.

moderatormailer

This names the default machine that contains forwarding aliases for all moderated groups. It

 

is only used if the moderators(5) file doesn’t exist or if the group is not matched by that file.

 

The value is interpreted as a pattern match; see moderators(5).

organization

This specifies what to put in the Organization header if it is blank. The value of the

 

ORGANIZATION environment variable, if it exists, overrides this.

pathhost

This specifies how to name the local site when building the Path header line. The default is

 

the fully qualified domain name of the local host.

server

This specifies the name of the NNTP server to which an article should be posted. The value

 

of the NNTPSERVER environment variable, if it exists, overrides this.

domain

This should be the domain name of the local host. It should not have a leading period, and

 

it should not be a full host address. It is used only if the GetFQDN routine in libinn(3) cannot

 

get the fully qualified domain name by using either the gethostname(2) or gethostbyname(3)

 

calls. The check is very simple; if either routine returns a name with a period in it, then it is

 

assumed to have the full domain name.

 

Part V: File Formats

1142

 

 

 

Three parameters are used only by nnrpd when accepting postings from clients:

mime-version

If this parameter is present, then nnrpd will add the necessary MIME (Multipurpose Internet

 

Mail Extensions) headers to all any articles that do not have a Mime-Version header. This

 

parameter specifies the MIME version and should normally be 1.0.

mime-contenttype

If MIME headers are being added, this parameter specifies the value of the Content-Type

 

header. The default value is text/plain; charset=US-ASCII.

mime-encoding

If MIME headers are being added, this parameter specifies the value of the Content-

 

Transfer-Encoding header. The default value is 7bit.

Note that this file can be identical on all machines in an organization.

EXAMPLE

fromhost:

foo.com

moderatormailer:

%s@uunet.uu.net

organization:

Foo, Incorporated

#pathhost:

Use FQDN.

server:

news.foo.com

domain:

foo.com

This file is intended to be fairly static; any changes made to it are typically not reflected until a program restarts.

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.

SEE ALSO

libinn(3), moderators(5)

innwatch.ctl

innwatch.ctl—Control Usenet supervision by innwatch.

DESCRIPTION

The file /news/lib/innwatch.ctl is used to determine what actions are taken during the periodic supervisions by innwatch.

The file consists of a series of lines; blank lines and lines beginning with a number sign (#) are ignored. All other lines consist of seven fields, each preceded by a delimiting character:

:label:state:condition:test:limit:command:reason

The delimiter can be any one of several non-alphanumeric characters that does not appear elsewhere in the line; there is no way to quote it to include it in any of the fields. Any of !, ,, :, @, ;, or ? is a good choice. Each line can have a different delimiter; the first character on each line is the delimiter for that line. Whitespace surrounding delimiters, except before the first, is ignored and does not form part of the fields; whitespace within fields is permitted. All delimiters must be present.

The first field is a label for the control line. It is used as an internal state indicator and in ctlinnd messages to control the server. If omitted, the line number is used.

The second field specifies when this control line should be used. It consists of a list of labels and special indicators separated by whitespace. If the current state matches against any of the labels in this field, this line will be used as described below. The values that may be used are

This line matches if the current state is the same as the label on this line, or if the current state

 

is run, the initial state. This is also the default state if this field is empty.

innwatch.ctl 1143

+

This line matches if the current state is run.

*

This line always matches.

label

This line matches if the current state is the specified label.

–label

This line matches if the current state is not the specified label.

The third field specifies a shell command that is invoked if this line matches. Do not use any shell filename expansion characters such as *, ?, or [ (even quoted, they’re not likely to work as intended). If the command succeeds, as indicated by its exit status, it is expected to have printed a single integer to standard output. This gives the value of this control line, to be used below. If the command fails, the line is ignored. The command is executed with its current directory set to the newsspool directory, /news/spool.

The fourth field specifies the operator to use to test the value returned above. It should be one of the two-letter numeric test operators defined in test(1) such as eq, lt, and the like. The leading dash () should not be included.

The fifth field specifies a constant with which to compare the value using the operator just defined. This is done by invoking the command

test value -operator constant

The line is said to “succeed” if it returns true.

The sixth field specifies what should be done if the line succeeds and in some cases if it fails. Any of the following words may be used:

throttle

Causes innwatch to throttle the server if this line succeeds. It also sets the state to the value of

 

the line’s label. If the line fails and the state was previously equal to the label on this line (that

 

is, this line had previously succeeded), then a go command will be sent to the server, and

 

innwatch will return to the run state. The throttle is only performed if the current state is run

 

or a state other than the label of this line, regardless of whether the command succeeds.

pause

Is identical to throttle except that the server is paused.

shutdown

Sends a shutdown command to the server. It is for emergency use only.

flush

Sends a flush command to the server.

go

Causes innwatch to send a go command to the server and to set the state to run.

exit

Causes innwatch to exit.

skip

The result of the control file is skipped for the current pass.

The last field specifies the reason that is used in those ctlinnd commands that require one. More strictly, it is part of the reason; innwatch appends some information to it. In order to enable other sites to recognize the state of the local innd server, this field should usually be set to one of several standard values. Use No space if the server is rejecting articles because of a lack of filesystem resources. Use loadav if the server is rejecting articles because of a lack of CPU resources.

Once innwatch has taken some action as a consequence of its control line, it skips the rest of the control file for this pass. If the action was to restart the server (that is, issue a go command), then the next pass will commence almost immediately so that innwatch can discover any other condition that may mean that the server should be suspended again.

EXAMPLES

@@@df .|awk ‘NR==2 {print $4}’@lt@10000@throttle@No space

@@@df -i .|awk ‘NR==2 {print $4}’@lt@1000@throttle@No space (inodes)

The first line causes the server to be throttled if the free space drops below 10000 units (using whatever units df uses) and restarted again when free space increases above the threshold.

The second line does the same for inodes.

The next three lines act as a group and should appear in the following order. It is easier to explain them, however, if they are described from the last up.

 

Part V: File Formats

1144

 

 

 

!load!load hiload!loadavg!lt!5!go! :hiload:+ load:loadavg:gt:8:throttle:loadav /load/+/loadavg/ge/6/pause/loadav

The final line causes the server to be paused if innwatch is in the run state and the load average rises to, or above, six. The state is set to load when this happens. The previous line causes the server to be throttled when innwatch is in the run or load state, and the load average rises above eight. The state is set to hiload when this happens. Note that innwatch can switch the server from paused to throttled if the load average rises from below six to between six and seven and then to above eight. The first line causes the server to be sent a go command if innwatch is in the load or hiload state and the load average drops below five.

Note that all three lines assume a mythical command loadavg that is assumed to print the current load average as an integer. In more practical circumstances, a pipe of uptime into awk is more likely to be useful.

BUGS

This file must be tailored for each individual site; the sample supplied is truly no more than a sample. The file should be ordered so that the more common problems are tested first.

The run state is not actually identified by the label with that three letter name, and using it will not work as expected.

Using an “unusual” character for the delimiter such as (, *, &, “”, and the like is likely to lead to obscure and hard-to-locate bugs.

HISTORY

Written by (kre@munnari.oz.au) for InterNetNews.

SEE ALSO

innd(8), ctlinnd(8), news.daily(8)

ipc

ipc—System V interprocess communication mechanisms.

SYNOPSIS

#include <sys/types.h>

#include <sys/ipc.h>

#include <sys/msg.h>

#include <sys/sem.h>

#include <sys/shm.h>

DESCRIPTION

The manual page refers to the Linux implementation of the System V interprocess communication mechanisms: message queues, semaphore sets, and shared memory segments. In the following, the word resource means an instantiation of one among such mechanisms.

RESOURCE ACCESS PERMISSIONS

For each resource, the system uses a common structure permissions to perform an ipc operation. The ipc_perm following members:

of type struct ipc_perm to store information needed in determining structure, defined by the <sys/ipc.h> system header file, includes the

ushort cuid; /* creator user id */ ushort cgid; /* creator group id */ ushort uid; /* owner user id */ ushort gid; /* owner group id */ ushort mode; /* r/w permissions */

ipc 1145

The mode member of the ipc_perm structure defines, with its lower nine bits, the access permissions to the resource for a process executing an ipc system call. The permissions are interpreted as follows:

0400

Read by user.

0200

Write by user.

0040

Read by group.

0020

Write by group.

0004

Read by others.

0002

Write by others.

Bits 0100, 0010, and 0001 (the execute bits) are unused by the system. Furthermore “write” effectively means “alter” for a semaphore set.

The same system header file defines also the following symbolic constants:

IPC_CREAT

IPC_EXCL

IPC_NOWAIT

IPC_PRIVATE

IPC_RMID

IPC_SET

IPC_STAT

Note that IPC_PRIVATE variable.

Create entry if key doesn’t exists.

Fail if key exists.

Error if request must wait.

Private key.

Remove resource.

Set resource options.

Get resource options.

is a key_t type, whereas all the others symbolic constants are flag fields ORable into an int type

MESSAGE QUEUES

A message queue is uniquely identified by a positive integer (its msqid) and has an associated data structure of type struct msquid_ds, defined in <sys/msg.h>, containing the following members:

struct ipc_perm msg_perm;

ushort msg_qnum; /* no of messages on queue */ ushort msg_qbytes; /* bytes max on a queue */ ushort msg_lspid; /* pid of last msgsnd call */ ushort msg_lrpid; /* pid of last msgrcv call */ time_t msg_stime; /* last msgsnd time */ time_t msg_rtime; /* last msgrcv time */ time_t msg_ctime; /* last change time */

msg_perm

ipc_perm structure that specifies the access permissions on the message queue.

msg_qnum

Number of messages currently on the message queue.

msg_qbytes

Maximum number of bytes of message text allowed on the message queue.

msg_lspid

ID of the process that performed the last msgsnd system call.

msg_lrpid

ID of the process that performed the last msgrcv system call.

msg_stime

Time of the last msgsnd system call.

msg_rtime

Time of the last msgcv system call.

msg_ctime

Time of the last system call that changed a member of the msqid_ds structure.

SEMAPHORE SETS

A semaphore set is uniquely identified by a positive integer (its semid) and has an associated data structure of type struct semid_ds, defined in <sys/sem.h>, containing the following members:

struct ipc_perm sem_perm;

time_t sem_otime; /* last operation time */

 

 

 

Part V: File Formats

1146

 

 

 

 

 

 

 

 

 

 

time_t

sem_ctime; /* last change time */

 

ushort

sem_nsems; /* count of sems in set */

sem_perm

ipc_perm structure that specifies the access permissions on the semaphore set.

sem_otime

Time of last semop system call.

sem_ctime

Time of last semctl system call that changed a member of the above structure or of one

 

semaphore belonging to the set.

sem_nsems

Number of semaphores in the set. Each semaphore of the set is referenced by a non-negative

 

integer ranging from 0 to sem_nsems–1.

A semaphore is a data structure of type struct sem containing the following members:

ushort semval; /* semaphore value */ short sempid; /* pid for last operation */

ushort semncnt; /* no. of awaiting semval to increase */ ushort semzcnt; /* no. of awaiting semval = 0 */

semval

Semaphore value: a non-negative integer.

sempid

ID of the last process that performed a semaphore operation on this semaphore.

semncnt

Number of processes suspended awaiting for semval to increase.

semznt

Number of processes suspended awaiting for semval to become zero.

SHARED MEMORY SEGMENTS

A shared memory segment is uniquely identified by a positive integer (its shmid) and has an associated data structure of type struct shmid_ds, defined in <sys/shm.h>, containing the following members:

struct ipc_perm shm_perm;

int shm_segsz; /* size of segment */ ushort shm_cpid; /* pid of creator */ ushort shm_lpid; /* pid, last operation */

short shm_nattch; /* no. of current attaches */ time_t shm_atime; /* time of last attach */ time_t shm_dtime; /* time of last detach */ time_t shm_ctime; /* time of last change */

shm_perm

ipc_perm structure that specifies the access permissions on the shared memory segment.

shm_segsz

Size in bytes of the shared memory segment.

shm_cpid

ID of the process that created the shared memory segment.

shm_lpid

ID of the last process that executed a shmat or shmdt system call.

shm_nattch

Number of current alive attaches for this shared memory segment.

shm_atime

Time of the last shmat system call.

shm_dtime

Time of the last shmdt system call.

shm_ctime

Time of the last shmctl system call that changed shmid_ds.

SEE ALSO

ftok(3), msgctl(2), msgget(2), msgrcv(2), msgsnd(2), semctl(2), semget(2), semop(2), shmat(2), shmctl(2), shmget(2), shmdt (2)

Linux 0.99.13, 1 November 1993

issue

issue—Issue identification file.

lilo.conf 1147

DESCRIPTION

The file /etc/issue is a text file that contains a message or system identification to be printed before the login prompt. It may contain various @char and \char sequences if supported by getty(1).

FILES

/etc/issue

SEE ALSO

getty(1), motd(5)

Linux, 24 July 1993

lilo.conf

lilo.conf—Configuration file for LILO.

DESCRIPTION

This file, by default /etc/lilo.conf, is read by the boot loader installer LILO (see lilo(8)).

It might look as follows:

boot = /dev/hda delay = 40 compact

vga = normal root = /dev/hda1 read-only

image = /zImage-1.5.99 label = try

image = /zImage-1.0.9 label = 1.0.9 image = /tamu/vmlinuz label = tamu

root = /dev/hdb2 vga = ask

other = /dev/hda3 label = dos

table = /dev/hda

This configuration file specifies that LILO uses the Master Boot Record on /dev/hda. (For a discussion of the various ways to use LILO and the interaction with other operating systems, see user.tex from the LILO documentation.)

When booting, the boot loader will wait 4 seconds (40 deciseconds) for you to press Shift. If you don’t, then the first kernel image mentioned (/zImage-1.5.99, which you probably installed just 5 minutes ago) will be booted. If you do, the boot loader will ask you which image to boot. In case you forgot the possible choices, press Tab (or ? if you have a U.S. keyboard), and you will be presented with a menu. You now have the choice of booting this brand new kernel, an old trusted kernel, or a kernel on another root file system (just in case you did something stupid on your usual root) or booting a different operating system. There can be up to 16 images mentioned in lilo.conf.

As can be seen previously, a configuration file starts with a number of global options (the top six lines in the example), followed by descriptions of the options for the various images. An option in an image description will override a global option.

 

Part V: File Formats

1148

 

 

 

GLOBAL OPTIONS

There are many possible keywords. The description that follows is almost literally from user.tex (just slightly abbreviated):

backup=backup-file

Copy the original boot sector to backup-file (which may also be a device, such as /dev/null)

 

instead of /boot/boot.NNNN.

boot=boot-device

Sets the name of the device (such as a hard disk partition) that contains the boot sector. If

 

this keyword is omitted, the boot sector is read from (and possibly written to) the device

 

that is currently mounted as root.

compact

Tries to merge read requests for adjacent sectors into a single read request. This drastically

 

reduces load time and keeps the map smaller. Using compact is especially recommended

 

when booting from a floppy disk.

default=name

Uses the specified image as the default boot image. If default is omitted, the image

 

appearing first in the configuration file is used.

delay=tsecs

Specifies the number of tenths of a second the boot loader should wait before booting the

 

first image. This is useful on systems that immediately boot from the hard disk after

 

enabling the keyboard. The boot loader doesn’t wait if delay is omitted or is set to zero.

disk=device-name

Defines non-standard parameters for the specified disk. See section “Disk Geometry” of

 

user.tex for details.

disktab=disktab-file

Specifies the name of the disk parameter table. The map installer looks for /etc/disktab if

 

disktab is omitted. The use of disktabs is discouraged.

fix-table

This allows LILO to adjust 3-D addresses in partition tables. Each partition entry contains a

 

3-D (sector/head/cylinder) and a linear address of the first and the last sector of the

 

partition. If a partition is not track-aligned and if certain other operating systems (such as

 

PC/MS-DOS or OS/2) are using the same disk, they may change the 3-D address. LILO

 

can store its boot sector only on partitions where both address types correspond. LILO

 

readjusts incorrect 3-D start addresses if fix-table is set.

 

Warning: This does not guarantee that other operating systems may not attempt to reset the

 

address later. It is also possible that this change has other, unexpected side effects. The

 

correct fix is to repartition the drive with a program that does align partitions to tracks.

 

Also, with some disks (such as some large EIDE disks with address translation enabled),

 

under some circumstances, it may even be unavoidable to have conflicting partition table

 

entries.

force-backup=backup-file

Like backup but overwrite an old backup copy if it exists.

ignore-table

Tells LILO to ignore corrupt partition tables.

install=boot-sector

Install the specified file as the new boot sector. If install is omitted, /boot/boot.b is used as

 

the default.

linear

Generate linear sector addresses instead of sector/head/cylinder addresses. Linear addresses

 

are translated at runtime and do not depend on disk geometry. Note that boot disks may

 

not be portable if linear is used because the BIOS service to determine the disk geometry

 

does not work reliably for floppy disks. When using linear with large disks, /sbin/lilo may

 

generate references to inaccessible disk areas because 3-D sector addresses are not known

 

before boot time.

lock

Enables automatic recording of boot command lines as the defaults for the following boots.

 

This way, LILO “locks” on a choice until it is manually overridden.

map=map-file

Specifies the location of the map file. If map is omitted, the file /boot/map is used.

message=message-file

Specifies a file containing a message that is displayed before the boot prompt. No message is

 

displayed while waiting for a shifting key after printing LILO . In the message, the FF

 

character (Ctrl+L) clears the local screen. The size of the message file is limited to 65,535

 

bytes. The map file has to be rebuilt if the message file is changed or moved.

nowarn

Disables warnings about possible future dangers.

 

lilo.conf

 

 

 

 

1149

 

 

 

 

 

 

 

optional

The per-image option optional applies to all images.

 

password=password

The per-image option password=... applies to all images.

 

prompt

Forces entering the boot prompt without expecting any prior key presses. Unattended

 

 

reboots are impossible if prompt is set and timeout isn’t.

 

restricted

The per-image option restricted applies to all images.

 

serial=parameters

Enables control from a serial line. The specified serial port is initialized and the boot loader

 

is accepting input from it and from the PC’s keyboard. Sending a break on the serial line

 

 

corresponds to pressing a Shift key on the console in order to get the boot loader’s

 

 

attention. All boot images should be password-protected if the serial access is less secure

 

 

than access to the console, such as if the line is connected to a modem. The parameter string

 

has the following syntax:

 

 

<port>[,<bps>[<parity>[<bits>]]]

 

 

<port>: The number of the serial port, zero-based. 0 corresponds to COM1 alias /dev/ttyS0,

 

and so on. All four ports can be used (if present). <bps>: The baud rate of the serial port.

 

 

The following baud rates are supported: 110, 150, 300, 600, 1200, 2400, 4800, and 9600

 

bps. Default is 2400 bps.

 

 

<parity>: The parity used on the serial line. The boot loader ignores input parity and strips

 

the eighth bit. The following (uppercase or lowercase) characters are used to describe the

 

 

parity: n for no parity, e for even parity, and o for odd parity.

 

 

<bits>: The number of bits in a character. Only 7 and 8 bits are supported. Default is 8 if

 

 

parity is none and 7 if parity is even or odd.

 

 

If serial is set, the value of delay is automatically raised to 20. For example, serial=0,2400n8

 

initializes COM1 with the default parameters.

 

timeout=tsecs

Sets a time-out (in tenths of a second) for keyboard input. If no key is pressed for the

 

 

specified time, the first image is automatically booted. Similarly, password input is aborted

 

if the user is idle for too long. The default time-out is infinite.

 

verbose=level

Turns on a lot of progress reporting. Higher numbers give more verbose output. If –v is

 

 

additionally specified on the LILO command line, the level is increased accordingly. The

 

 

maximum verbosity level is 5.

 

Additionally, the kernel configuration parameters append, ramdisk, read-only, global options section. They are used as defaults if they aren’t specified in the images.

read-write, root, and vga can be set in the configuration sections of the respective kernel

PER-IMAGE SECTION

A per-image section starts with either a line

image=pathname

to indicate a file or device containing the boot image of a Linux kernel or a line

other=pathname

to indicate an arbitrary system to boot.

In the former case, if an image line specifies booting from a device, then one has to indicate the range of sectors to be mapped using

range=start-end

In the latter case (booting another system), there are the three options:

loader=chain-loader

This specifies the chain loader that should be used. By default, /boot/chain.b is used. The

 

chain loader must be specified if booting from a device other than the first hard or floppy

 

disk.

 

Part V: File Formats

1150

 

 

 

table=device

This specifies the device that contains the partition table. The boot loader will not pass

 

partition information to the booted operating system if this variable is omitted. (Some

 

operating systems have other means to determine from which partition they have been

 

booted. For example, MS-DOS usually stores the geometry of the boot disk or partition in

 

its boot sector.) Note that /sbin/lilo must be rerun if a partition table mapped referenced

 

with table is modified.

unsafe

Do not access the boot sector at map creation time. This disables some sanity checks,

 

including a partition table check. If the boot sector is on a fixed-format floppy disk device,

 

using UNSAFE avoids the need to put a readable disk into the drive when running the map

 

installer. unsafe and table are mutually incompatible.

In both cases, the following options apply:

label=name

The boot loader uses the main file name (without its path) of each image specification to

 

identify that image. A different name can be used by setting the variable label.

alias=name

A second name for the same entry can be used by specifying an alias.

lock

(See previous description.)

optional

Omit the image if it is not available at map creation time. This is useful to specify test

 

kernels that are not always present.

password=password

Protect the image by a password.

restricted

A password is only required to boot the image if parameters are specified on the command

 

line (such as single).

KERNEL OPTIONS

If the booted image is a Linux kernel, then one may pass command-line parameters to this kernel.

append=string

Appends the options specified to the parameter line passed to the kernel. This is typically

 

used to specify parameters of hardware that can’t be entirely autodetected or for which

 

probing may be dangerous. Example: append = “hd=64,32,202”.

literal=string

Like append but removes all other options (such as setting of the root device). Because vital

 

options can be removed unintentionally with literal, this option cannot be set in the

 

global options section.

ramdisk=size

This specifies the size of the optional RAM disk. A value of zero indicates that no RAM disk should be created. If this variable is omitted, the RAM disk size configured into the boot image is used.

read-only

This specifies that the root filesystem should be mounted read-only. Typically, the system

 

startup procedure remounts the root filesystem read-write later (such as after fscking it).

read-write

This specifies that the root filesystem should be mounted read-write.

root=root-device

This specifies the device that should be mounted as root. If the special name current is used,

 

the root device is set to the device on which the root filesystem is currently mounted. If the

 

root has been changed with -r, the respective device is used. If the variable root is omitted,

 

the root device setting contained in the kernel image is used. (That is set at compile time

 

using the ROOT DEV variable in the kernel makefile and can later be changed with the rdev(8)

 

program.)

vga=mode

This specifies the VGA text mode that should be selected when booting. The following

 

values are recognized (case is ignored):

 

normal: Select normal 80x25 text mode.

 

extended (or ext): Select 80x50 text mode.

 

ask: Stop and ask for user input (at boot time).

 

<number>: Use the corresponding text mode. A list of available modes can be obtained by

 

booting with vga=ask and pressing Enter.

moderators 1151

If this variable is omitted, the VGA mode setting contained in the kernel image is used. (That is set at compile time using the SVGA MODE variable in the kernel makefile and can later be changed with the rdev(8) program.)

SEE ALSO

lilo(8), rdev(8). The LILO distribution comes with very extensive documentation of which the preceding information is an extract.

28 July 1995

MAKEDEV.cfg

MAKEDEV.cfg—Configuration for MAKEDEV(8).

DESCRIPTION

MAKEDEV.cfg is a text file that tells MAKEDEV(8) what to do (and equally importantly, what not to do). Unlike DEVINFO(5), which is meant to be centrally maintained, it contains all local configuration for a particular site and all customization. There are basically two kinds of declaration in this file: a “class” declaration and an “omit” declaration.

A class declaration has the form

class name : owner group-owner permissions

This says that any devices placed in the specified class by DEVINFO should be created with this ownership and these permissions. A sample entry might be

class public: root system 0666

This says that devices marked public should be owned by root.system and have mode 666.

An omit declaration has the form

omit { device... }

This causes the specified devices to never be created, even if explicitly specified. Use caution when setting this up. The intent is to be able to run MAKEDEV update and not have it create all sorts of useless devices you’d never use.

SEE ALSO

MAKEDEV(8), DEVINFO(5)

Version 1.4, January 1995

moderators

moderators—Mail addresses for moderated Usenet newsgroups.

DESCRIPTION

The GetModeratorAddress(3) routine reads the file /news/lib/moderators to determine how to reach the moderator of a newsgroup. This is used by inews(1) when an unapproved local posting is made to a moderated newsgroup.

The file is read until a match is found. Blank lines and lines starting with a number sign (#) are ignored. All other lines should consist of two fields separated by a colon.

The first field is a wildmat(3)-style pattern. If it matches the name of the newsgroup, then the second field is taken to be a format string for sprintf(3). This string should have at most one %s parameter, which will be given the name of the newsgroup with periods transliterated to dashes.

 

Part V: File Formats

1152

 

 

 

Here is a sample file:

foo.important:announce-request@foo.com foo.*:%s@mailer.foo.com gnu.*:%s@prep.ai.mit.edu :%s@uunet.uu.net

Using this file, postings to the moderated newsgroup in the left column will be sent to the address shown in the right column:

foo.important announce-request@foo.com foo.x.announce foo-x-announce@mailer.foo.com gnu.emacs.sources gnu-emacs-sources@prep.ai.mit.edu comp.sources.unix comp-sources-unix@uunet.uu.net

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.

SEE ALSO

inews(1), inn.conf(5), libinn(3), wildmat(3)

/etc/modules

/etc/modules—Kernel modules to load at boot time.

DESCRIPTION

The /etc/modules file contains the names of kernel modules that are to be loaded at boot time, one per line. Comments begin with a #, and everything on the line after them are ignored.

Debian GNU/Linux version 0.93

motd

motd—Message of the day.

DESCRIPTION

The contents of /etc/motd are displayed by login(1) after a successful login but just before it executes the login shell.

The motd stands for “message of the day,” and this file has been traditionally been used for exactly that. (It requires much less disk space than mail to all users.)

FILES

/etc/motd

SEE ALSO

login(1) issue(5)

Linux, 29 December 1992

mtools

mtools—Table of DOS devices.

mtools 1153

DESCRIPTION

/etc/mtools.conf and ~/.mtoolsrc are the configuration files for mtools. These configuration files describe the following items:

Global configuration flags and variables

Per-drive flags and variables

Character translation tables

/etc/mtools.conf is the system-wide configuration file, and ~/.mtoolsrc is the user’s private configuration file.

GENERAL SYNTAX

The configuration files is made up of sections. Each section starts with a keyword identifying the section followed by a colon. Then follow variable assignments and flags. Variable assignments take the following form:

name=value

Flags are lone keywords without an equal sign and value following them. A section either ends at the end of the file or where the next section begins.

Lines starting with a hash (#) are comments. Newline characters are equivalent to whitespace (except where ending a comment). The configuration file is case insensitive, except for items enclosed in quotes (such as filenames).

DEFAULT VALUES

For most platforms, mtools contains reasonable compiled-in defaults. You usually don’t need to bother with the configuration file, if all you want to do with mtools is access your floppy drives. On the other hand, the configuration file is needed if you also want to use mtools to access your hard disk partitions and dosemu image files.

GLOBAL VARIABLES

Global variables may be set to 1 or to 0.

The following global flags are recognized:

MTOOLS_SKIP_CHECK

If this is set to 1, mtools skips most of its sanity checks. This is needed to read some Atari

 

disks that have been made with the earlier ROMs and that would not be recognized

 

otherwise.

MTOOLS_FAT_COMPATIBILITY

If this is set to 1, mtools skips the FAT size checks. Some disks have a bigger FAT than they

 

really need. These are rejected if this option is not set.

MTOOLS_LOWER_CASE

If this is set to 1, mtools displays all-uppercase short filenames as lowercase. This has been

 

done to allow a behavior that is consistent with older versions of mtools, which didn’t know

 

about the case bits.

For example, inserting the following line into your configuration file instructs mtools to skip the sanity checks:

MTOOLS_SKIP_CHECK=1.

Global variables may also be set via the environment: export MTOOLS_SKIP_CHECK=1.

PER-DRIVE FLAGS AND VARIABLES

Per-drive flags and values may be described in a drive section. A drive section starts with drive driveletter:.

Then follow variable-value pairs and flags.

GENERAL PURPOSE DRIVE VARIABLES

The following variables are available:

file

The name of the file or device holding the disk image. This is mandatory. The filename

 

should be enclosed in quotes.

 

Part V: File Formats

1154

 

 

 

use_xdf

If this is set to a nonzero value, mtools also tries to access this disk as an Xdf disk. Xdf is a

 

high-capacity format used by OS/2. This is off by default.

partition

Tells mtools to treat the drive as a partitioned device and to use the given partition. Only

 

primary partitions are accessible using this method, and they are numbered from 1 to 4. For

 

logical partitions, use the more general offset variable. The partition variable is intended

 

for Syquests, ZIP drives, and DOSEMU hdimages. It is not recommended for hard disks to

 

which direct access to partitions is available.

offset

Describes where in the file the MS-DOS filesystem starts. This is useful for logical partitions

 

in DOSEMU hdimages and for ATARI RAM disks. By default, this is zero, meaning that

 

the filesystem starts right at the beginning of the device or file.

fat_bits

The number of FAT bits. This can be 12 or 16. This is very rarely needed because it can

 

almost always be deduced from information in the boot sector. On the contrary, describing

 

the number of fat bits can actually be harmful if you get it wrong. You should only use it if

 

mtools gets the autodetected number of fat bits wrong or if you want to mformat a disk with

 

a weird number of fat bits.

Only the file option is mandatory. The other parameters may be left out. In that case, a default value or an autodetected value is used.

DRIVE GEOMETRY CONFIGURATION

Geometry information describes the physical characteristics about the disk. Its has three purposes:

mformat

The geometry information is written into the boot sector of the newly made disk. However,

 

you may also describe the geometry information on the command line. See mformat(1) for

 

details.

filtering

On some Unices, device nodes only support one physical geometry. The geometry is

 

compared to the actual geometry stored on the boot sector to make sure that this device

 

node is able to correctly read the disk. If the geometry doesn’t match, this drive entry fails,

 

and the next drive entry bearing the same drive letter is tried. See the next section “Supply-

 

ing Multiple Descriptions for a Drive” for more details on supplying several descriptions for

 

a drive letter.

 

If no geometry information is supplied in the configuration file, all disks are accepted. On

 

Linux (and on Sparc), there exist device nodes with configurable geometry (/dev/fd0, /dev/

 

fd1 etc), so filtering is not needed (and ignored) for disk drives. (mtools still does do

 

filtering on plain files (disk images) in Linux: This is mainly intended for test purposes

 

because I don’t have access to a UNIX that would actually need filtering.)

initial geometry

The geometry information (if available) is also used to set the initial geometry on

 

configurable device nodes. This initial geometry is used to read the boot sector, which

 

contains the real geometry. If no geometry information is supplied in the configuration file,

 

no initial configuration is done. On Linux, this is not really needed either because the

 

configurable devices are able to autodetect the disk type accurately enough (for most

 

common formats) to read the boot sector.

Wrong geometry information may lead to very bizarre errors. That’s why I strongly recommend that you don’t use geometry configuration unless you really need it.

The following geometry related variables are available:

cylinders

The number of cylinders.

heads

The number of heads (sides).

sectors

The number of sectors per track.

mtools 1155

For example, the following drive section describes a 1.44M drive:

drive a: file=”/dev/fd0H1440" fat_bits=12

tracks=80 heads=2 sectors=18

The following shorthand geometry descriptions are available:

1.44M

High density, 3 1/2 disk. Equivalent to fat_bits=12

tracks=80

heads=2

sectors=18.

1.2M

High density, 5 1/4 disk. Equivalent to fat_bits=12

tracks=80

heads=2

sectors=15.

720K

Double density, 3 1/2 disk. Equivalent to fat_bits=12

tracks=80

heads=2

sectors=9.

360K

Double density, 5 1/4 disk. Equivalent to fat_bits=12

tracks=40

heads=2

sectors=9.

The shorthand format descriptions may be amended. For example, 360K sectors=8 describes a 320K disk and is equivalent to fat_bits=12 tracks=40 heads=2 sectors=8.

OPEN FLAGS

Moreover, the following flags are available:

sync

All I/O operations are done synchronously.

nodelay

The device or file is opened with the O_NDELAY flag. This is needed on some non-Linux

 

architectures.

exclusive

The device or file is opened with the O_EXCL flag. On Linux, this ensures exclusive access to

 

the floppy drive. On most other architectures and for plain files, it has no effect at all.

SUPPLYING MULTIPLE DESCRIPTIONS FOR A DRIVE

It is possible to supply multiple descriptions for a drive. In that case, the descriptions are tried in order until one is found that fits. Descriptions may fail for several reasons:

The geometry is not appropriate

There is no disk in the drive

Other problems

Multiple definitions are useful when using physical devices that are only able to support one single disk geometry:

drive a: file=”/dev/fd0H1440" 1.44m drive a: file=”/dev/fd0H720" 720k

This instructs mtools to use /dev/fd0H1440 for 1.44M (high density) disks and /dev/fd0H720 for 720K (double density) disks. On Linux, this feature is not really needed because the /dev/fd0 device is able to handle any geometry.

You can also use multiple drive descriptions to access both of your physical drives through one drive letter:

drive z: file=”/dev/fd0" drive z: file=”/dev/fd1"

With this description, mdir z: accesses your first physical drive if it contains a disk. If the first drive doesn’t contain a disk, mtools checks the second drive.

When using multiple configuration files, drive descriptions in the files parsed last override descriptions for the same drive in earlier files. In order to avoid this, use the drive+ or +drive keywords instead of drive. The first adds a description to the end of the list (will be tried last), and the second adds it to the start of the list.

CHARACTER TRANSLATION TABLES

If you live in the USA, in Western Europe, or in Australia, you can skip this section.

 

Part V: File Formats

1156

 

 

 

INTRODUCTION

DOS uses a different character code mapping from UNIX. Seven-bit characters still have the same meaning; only characters with the eight-bit set are affected. To make matters worse, there are several translation tables available depending on the country where you are. The appearance of the characters is defined using code pages. These code pages aren’t the same for all countries. For instance, some code pages don’t contain upper -case accented characters. On the other hand, some code pages contain characters that don’t exist in UNIX, such as certain line-drawing characters or accented consonants used by some Eastern European countries. This affects two things relating to filenames:

Uppercase characters

In short names, only uppercase characters are allowed. This also holds for accented

 

characters. For instance, in a code page that doesn’t contain accented uppercase characters,

 

the accented lowercase characters get transformed into their unaccented counterparts.

Long filenames

Microsoft has finally come to their senses and uses a more standard mapping for the long

 

filenames. They use Unicode, which is basically a 32-bit version of ASCII. Its first 256

 

characters are identical to UNIX ASCII. Thus, the code page also affects the correspondence

 

between the codes used in long names and those used in short names.

mtools considers the filenames entered on the command line as having the UNIX mapping and translates the characters to get short names. By default, code page 850 is used with the Swiss uppercase/lowercase mapping. I chose this code page because its set of existing characters most closely matches UNIX’s. Moreover, this code page covers most characters in use in the USA, Australia, and Western Europe. However, it is still possible to chose a different mapping. There are two methods: the country variable and explicit tables.

CONFIGURATION USING COUNTRY

The COUNTRY variable is recommended for people that also have access to MS-DOS system files and documentation. If you don’t have access to these, I’d suggest you use explicit tables instead.

Syntax: COUNTRY=” country [,[ codepage ], country.sys ]”

This tells mtools to use a UNIX-to-DOS translation table that matches codepage and an lowercase-to-uppercase table for country and to use the country.sys file to get the lowercase-to-uppercase table. The country code is most often the telephone prefix of the country. Refer to the DOS help page on country for more details. The codepage and the country.sys parameters are optional. Don’t type in the square brackets; they are only there to indicate which parameters are optional. The country.sys file is supplied with MS-DOS. In most cases, you don’t need it because the most common translation tables are compiled into mtools. Don’t worry if you run a UNIX-only box that lacks this file.

If codepage is not given, a per-country default code page is used. If the country.sys parameter isn’t given, compiled-in defaults are used for the lowercase-to-uppercase table. This is useful for other Unices than Linux, which may have no country.sys file available online.

The UNIX-to-DOS are not contained in the country.sys file, and thus mtools always uses compiled-in defaults for those. Thus, only a limited amount of code pages are supported. If your preferred code page is missing, or if you know the name of the Windows 95 file that contains this mapping, drop me a line at Alain.Knaff@inrialpes.fr.

The COUNTRY variable can also be set using the environment.

CONFIGURATION USING EXPLICIT TRANSLATION TABLES

Translation tables may be described in lines in the configuration file. Two tables are needed: first the DOS-to-UNIX table and then the lowercase-to-uppercase table. A DOS-to-UNIX table starts with the tounix keyword, followed by a colon and 128 hexadecimal numbers. A lower-to-upper table starts with the fucase keyword, followed by a colon and 128 hexadecimal numbers.

The tables only show the translations for characters whose codes is greater than 128 because translation for lower codes is trivial. Example:

mtools 1157

tounix:

0xc7 0xfc 0xe9 0xe2 0xe4 0xe0 0xe5 0xe7 0xea 0xeb 0xe8 0xef 0xee 0xec 0xc4 0xc5 0xc9 0xe6 0xc6 0xf4 0xf6 0xf2 0xfb 0xf9 0xff 0xd6 0xdc 0xf8 0xa3 0xd8 0xd7 0x5f 0xe1 0xed 0xf3 0xfa 0xf1 0xd1 0xaa 0xba 0xbf 0xae 0xac 0xbd 0xbc 0xa1 0xab 0xbb 0x5f 0x5f 0x5f 0x5f 0x5f 0xc1 0xc2 0xc0 0xa9 0x5f 0x5f 0x5f 0x5f 0xa2 0xa5 0xac 0x5f 0x5f 0x5f 0x5f 0x5f 0x5f 0xe3 0xc3 0x5f 0x5f 0x5f 0x5f 0x5f 0x5f 0x5f 0xa4 0xf0 0xd0 0xc9 0xcb 0xc8 0x69 0xcd 0xce 0xcf 0x5f 0x5f 0x5f 0x5f 0x7c 0x49 0x5f 0xd3 0xdf 0xd4 0xd2 0xf5 0xd5 0xb5 0xfe 0xde 0xda 0xd9 0xfd 0xdd 0xde 0xaf 0xb4 0xad 0xb1 0x5f 0xbe 0xb6 0xa7 0xf7 0xb8 0xb0 0xa8 0xb7 0xb9 0xb3 0xb2 0x5f 0x5f

fucase:

0x80 0x9a 0x90 0xb6 0x8e 0xb7 0x8f 0x80 0xd2 0xd3 0xd4 0xd8 0xd7 0xde 0x8e 0x8f 0x90 0x92 0x92 0xe2 0x99 0xe3 0xea 0xeb 0x59 0x99 0x9a 0x9d 0x9c 0x9d 0x9e 0x9f 0xb5 0xd6 0xe0 0xe9 0xa5 0xa5 0xa6 0xa7 0xa8 0xa9 0xaa 0xab 0xac 0xad 0xae 0xaf 0xb0 0xb1 0xb2 0xb3 0xb4 0xb5 0xb6 0xb7 0xb8 0xb9 0xba 0xbb 0xbc 0xbd 0xbe 0xbf 0xc0 0xc1 0xc2 0xc3 0xc4 0xc5 0xc7 0xc7 0xc8 0xc9 0xca 0xcb 0xcc 0xcd 0xce 0xcf 0xd1 0xd1 0xd2 0xd3 0xd4 0x49 0xd6 0xd7 0xd8 0xd9 0xda 0xdb 0xdc 0xdd 0xde 0xdf 0xe0 0xe1 0xe2 0xe3 0xe5 0xe5 0xe6 0xe8 0xe8 0xe9 0xea 0xeb 0xed 0xed 0xee 0xef 0xf0 0xf1 0xf2 0xf3 0xf4 0xf5 0xf6 0xf7 0xf8 0xf9 0xfa 0xfb 0xfc 0xfd 0xfe 0xff

The first table maps DOS character codes to UNIX character codes. For example, the DOS character number 129 is a u with two dots on top of it. To translate it into UNIX, we look at the character number 1 in the first table (1 = 129 - 128). This is 0xfc. (Beware; numbering starts at 0.) The second table maps lowercase DOS characters to uppercase DOS characters. The same lowercase u with dots maps to character 0x9a, which is an uppercase U with dots in DOS.

UNICODE CHARACTERS GREATER THAN 256

If an existing MS-DOS name contains Unicode character greater than 256, these are translated to underscores or to characters that are close in visual appearance. For example, accented consonants are translated into their unaccented counterparts. This translation is used for mdir and for the UNIX filenames generated by mcopy. Linux does support Unicode too, but unfortunately, too few applications support it yet to bother with it in mtools. Most importantly, xterm can’t display Unicode yet. If there is sufficient demand, I might include support for Unicode in the UNIX filenames as well.

Caution: When deleting files with mtools, the underscore matches all characters that can’t be represented in UNIX. Be careful before mdel!

LOCATION OF CONFIGURATION FILES AND PARSING ORDER

The configuration files are parsed in the following order:

Compiled-in defaults

 

Part V: File Formats

1158

 

 

 

/etc/mtools.conf

/etc/mtools. This is for backwards compatibility only and is only parsed if mtools.conf doesn’t exist.

~/.mtoolsrc

Options described in the later files override those described in the earlier files. Drives defined in earlier files persist if they are not overridden in the later files. For instance, drives A and B may be defined in /etc/mtools.conf and drives C and D may be defined in ~/.mtoolsrc. However, if ~/.mtoolsrc also defines drive A, this new description would override the description of drive A in /etc/mtools.conf instead of adding to it. If you want to add a new description to a drive already described in an earlier file, you need to use either the +drive or drive+ keywords.

BACKWARDS COMPATIBILITY

The syntax described herein is new for version mtools 2.5.4. The old line-oriented syntax is still supported. Each line beginning with a single letter is considered to be a drive description using the old syntax. Old style and new style drive sections may be mixed within the same configuration file to make upgrading easier. Support for the old syntax will be phased out eventually, and to discourage its use, I purposefully omit its description here.

FILES

/etc/mtools.conf

˜/.mtoolsrc

SEE ALSO

mtools(1)

5 December 1995

newsfeeds

newsfeeds—Determine where Usenet articles get sent.

DESCRIPTION

The file /news/lib/newsfeeds specifies how incoming articles should be distributed to other sites. It is parsed by the InterNetNews server innd(8) when it starts up or when directed to by ctlinnd(8).

The file is interpreted as a set of lines according to the following rules. If a line ends with a backslash, then the backslash, the newline, and any whitespace at the start of the next line is deleted. This is repeated until the entire “logical” line is collected. If the logical line is blank or starts with a number sign (#), it is ignored.

All other lines are interpreted as feed entries. An entry should consist of four colon-separated fields; two of the fields may have optional subfields, marked off by a slash. Fields or subfields that take multiple parameters should be separated by a comma. Extra whitespace can cause problems. Except for the site names, case is significant. The format of an entry is

sitename[/exclude,exclude,...]\ :pattern,pattern...[/distrib,distrib...]\ :flag,flag...\

:param

Each field is described below.

The sitename is the name of the site to which a news article can be sent. It is used for writing log entries and for determining if an article should be forwarded to a site. If sitename already appears in the article’s Path header, then the article will not be sent to the site. The name is usually whatever the remote site uses to identify itself in the Path line but can be almost any word that makes sense; special local entries (such as archivers or gateways) should probably end with an exclamation point to make sure that they do not have the same name as any real site. For example, gateway is an obvious name for the local entry that forwards articles out to a mailing list. If a site with the name gateway posts an article, when the local site receives the

comp.sources-only

newsfeeds 1159

article, it will see the name in the Path and not send the article to its own gateway entry. If an entry has an exclusion subfield, then the article will not be sent to that site if any of the names specified as excludes appear in the Path header. The same sitename can be used more than once; the appropriate action will be taken for each site that should receive the article, regardless of the name, although this is recommended only for program feeds to avoid confusion. Case is not significant in site names.

The patterns specify which groups to send to the site and are interpreted to build a “subscription list” for the site. The default subscription is to get all groups. The patterns in the field are wildmat(3)-style patterns and are matched in order against the list of newsgroups that the local site receives. If the first character of a pattern is an exclamation mark, then any groups matching the pattern are removed from the subscription; otherwise, any matching groups are added. For example, to receive all comp groups but only comp.sources.unix within the sources newsgroups, the following set of patterns can be used:

comp.*,!comp.sources.*,comp.sources.unix

There are three things to note about this example. The first is that the trailing .* is required. The second is that, again, the result of the last match is the most important. The third is that comp.sources.* could be written as comp.sources*, but this would not have the same effect if there were a group.

See innd(8) for details on the propagation of control messages.

A subscription can be further modified by specifying “distributions” that the site should or should not receive. The default is to send all articles to all sites that subscribe to any of the groups where it has been posted, but if an article has a Distribution header and any distribs are specified, then they are checked according to the following rules:

1.If the Distribution header matches any of the values in the subfield, then the article is sent.

2.If a distrib starts with an exclamation point and it matches the Distribution header, then the article is not sent.

3.If Distribution header does not match any distrib in the site’s entry and no negations were used, then the article is not sent.

4.If Distribution header does not match any distrib in the site’s entry and any distrib started with an exclamation point, then the article is sent.

If an article has more than one distribution specified, then each one is evaluated according to the preceding rules. If any of the specified distributions indicate that the article should be sent, it is. If none do, it is not sent: The rules are used as a “logical or.” It is almost definitely a mistake to have a single feed that specifies distributions that start with an exclamation point along with some that don’t.

Distributions are text words, not patterns; it is usually a mistake to have entries like * or all there.

The flags parameter specifies miscellaneous parameters. They may be specified in any order; flags that take values should have the value immediately after the flag letter with no whitespace. The valid flags are

< size

An article will only be sent to the site if it is less than size bytes long. The default is no

 

limit.

 

A checks

An article will only be sent to the site if it meets the requirements specified in the checks,

 

which should be chosen from the following set:

 

d

Distribution header required

 

p

Do not check Path header before propagating.

B high/low

If a site is being fed by a file, channel, or exploder, the server will usually start trying to write

 

the information as soon as possible. Providing a buffer may give better system performance

 

and help smooth out overall load if a large batch of news comes in. The value of the this flag

 

should be two numbers separated by a slash. The first specifies the point at which the server

 

can start draining the feed’s I/O buffer, and the second specifies when to stop writing and

 

begin buffering again; the units are bytes. The default is to do no buffering, sending output

 

as soon as it is possible to do so.

F name

This flag specifies the name of the file that should be used if it is necessary to begin spooling

 

for the site. If name is not an absolute pathname, it is taken to be relative to /news/spool/

 

out.going. Then, if the destination is a directory, the file to go in that directory will be used

 

as filename.

 

 

Part V: File Formats

1160

 

 

 

G count

If this flag is specified, an article will only be sent to the site if it is posted to no more than

 

count newsgroups.

H count

If this flag is specified, an article will only be sent to the site if it has count or fewer sites in

 

its Path line. This flag should only be used as a rough guide because of the loose interpreta-

 

tion of the Path header; some sites put the poster’s name in the header, and some sites that

 

might logically be considered to be one hop become two because they put the posting

 

workstation’s name in the header. The default value for count is one.

I size

The flag specifies the size of the internal buffer for a file feed. If there are more file feeds

 

than allowed by the system, they will be buffered internally in least recently used order. If

 

the internal buffer grows bigger than size bytes, however, the data will be written out to the

 

appropriate file.

N modifiers

The newsgroups that a site receives are modified according to the modifiers, which should

 

be chosen from the following set:

 

m

Only moderated groups

 

u

Only unmoderated groups

S size

If the amount of data queued for the site gets to be larger than size bytes, then the server

 

will switch to spooling, appending to a file specified by the F flag or /news/spool/out.going/

 

sitename if the F flag is not specified. Spooling usually happens only for channel or exploder

 

feeds.

 

T type

This flag specifies the type of feed for the site. type should be a letter chosen from the

 

following set:

 

 

c

Channel

 

f

File

 

l

Log entry only

 

m

Funnel (multiple entries feed into one)

 

p

Program

 

x

Exploder. Each feed is described in the section on feed types.

 

The default is Tf.

W items

If a site is fed by file, channel, or exploder, this flag controls what information is written. If

 

a site is fed by a program, only the asterisk (*) has any effect. The items should be chosen

 

from the following set:

 

b

Size of the article in bytes.

 

f

Article’s full pathname.

 

g

The newsgroup the article is in; if cross-posted, then the first of the groups

 

 

this site gets.

 

m

Article’s Message-ID.

 

n

Article’s pathname relative to the spool directory.

 

p

The site that fed the article to the server; from the Path header.

 

s

The IP address of the site that sent the article.

 

t

Time article was received as seconds since epoch.

 

*

Names of the appropriate funnel entries; or all sites that get the article.

 

D

Value of the Distribution header; ? if none present.

 

H

All headers.

 

N

Value of the Newsgroups header.

 

O

Overview data.

 

R

Information needed for replication. More than one letter can be used; the

 

 

entries will be separated by a space and written in the order in which they are

 

 

specified. The default is Wn.

newsfeeds 1161

The H and O items are intended for use by programs that create news overview databases. If H is present, then the all the article’s headers are written followed by a blank line. An Xref header (even if one does not appear in the filed article) and a Bytes header, specifying the article’s size, will also be part of the headers. If used, this should be the only item in the list; if preceded by other items, however, a newline will be written before the headers. The O generates input to the overchan(8) program. It, too, should be the only item in the list.

The asterisk has special meaning. It expands to a space-separated list of all sites that received the current article. If the site is the target of a funnel, however (that is, it is named by other sites that have a Tm flag), then the asterisk expands to the names of the funnel feeds that received the article. If the site is fed by a program, then an asterisk in the param field will be expanded into the list of funnel feeds that received the article. A site fed by a program cannot get the site list unless it is the target of other Tm feeds.

The interpretation of the param field depends on the type of feed, and is explained in more detail in the section on feed types. It can be omitted.

The site named ME is special. There should only be one such entry, and it should be the first entry in the file. If the ME entry has a subscription list, then that list is automatically prepended to the subscription list of all other entries. For example, *,!control,!junk,!foo.* can be used to set up the initial subscription list for all feeds so that local postings are not propagated unless foo.* explicitly appears in the site’s subscription list. Note that most subscriptions should have !junk,!control in their pattern list; see the discussion of control messages in innd(8). (Unlike other news software, it does not affect what groups are received; that is done by the active(5) file.)

If the ME entry has a distribution subfield, then only articles that match the distribution list are accepted; all other articles are rejected. A commercial news server, for example, might have /!local to reject local postings from other, misconfigured, sites.

FEED TYPES

innd provides four basic types of feeds: log, file, program, and channel. An exploder is a special type of channel. In addition, several entries can feed into the same feed; these are funnel feeds, which refer to an entry that is one of the other types. Note that the term “feed” is technically a misnomer because the server does not transfer articles but reports that an article should be sent to the site.

The simplest feed is one that is fed by a log entry. Other than a mention in the news logfile, no data is ever written out. This is equivalent to a Tf entry writing to /dev/null except that no file is opened.

A site fed by a file is simplest type of feed. When the site should receive an article, one line is written to the file named by the param field. If param is not an absolute pathname, it is taken to be relative to /news/spool/out.going. If empty, the filename defaults to /news/spool/out.going/sitename. This name should be unique.

When a site fed by a file is flushed (see ctlinnd), the following steps are performed. The script doing the flush should have first renamed the file. The server tries to write out any buffered data and then closes the file. The renamed file is now available for use. The server will then reopen the original file, which will now get created.

A site fed by a program has a process spawned for every article that the site receives. The param field must be a sprintf(3) format string that may have a single %s parameter, which will be given a pathname for the article, relative to the news spool directory. The full pathname may be obtained by prefixing the %s in the param field by the news spool directory prefix. Standard input will be set to the article or /dev/null if the article cannot be opened for some reason. Standard output and error will be set to the error log. The process will run with the user and group ID of the /news/lib/innd directory. innd will try to avoid spawning a shell if the command has no shell meta-characters; this feature can be defeated by appending a semicolon to the end of the command. The full pathname of the program to be run must be specified; for security, PATH is not searched.

If the entry is the target of a funnel, and if the W* flag is used, then a single asterisk may be used in the param field where it will be replaced by the names of the sites that fed into the funnel. If the entry is not a funnel, or if the W* flag is not used, then the asterisk has no special meaning.

 

Part V: File Formats

1162

 

 

 

Flushing a site fed by a program does no action.

When a site is fed by a channel or exploder, the param field names the process to start. Again, the full pathname of the process must be given. When the site is to receive an article, the process receives a line on its standard input telling it about the article. Standard output and error and the user and group ID of the all subprocess are set as for a program feed. If the process exits, it will be restarted. If the process cannot be started, the server will spool input to a file named /news/spool/out.going/ sitename. It will then try to start the process some time later.

When a site fed by a channel or exploder is flushed, the server closes down its end of the pipe. Any pending data that has not been written will be spooled; see the description of the S flag. No signal is sent; it is up to the program to notice EOF on its standard input and exit. The server then starts a new process.

Exploders are a superset of channel feeds. In addition to channel behavior, exploders can be sent command lines. These lines start with an exclamation point, and their interpretation is up to the exploder. The following messages are generated automatically by the server:

newgroup group rmgroup group flush

flush site

These messages are sent when the ctlinnd command of the same name is received by the server. In addition, the send command can be used to send an arbitrary command line to the exploder child-process. The primary exploder is buffchan(8).

Funnel feeds provide a way of merging several site entries into a single output stream. For a site feeding into a funnel, the param field names the actual entry that does the feeding.

For more details on setting up different types of news feeds, see the INN installation manual.

EXAMPLES

##Initial subscription list and our distributions. ME:*,!junk,!foo.*/world,usa,na,ne,foo,ddn,gnu,inet\

::

##Feed all moderated source postings to an archiver source-archive!:!*,comp.sources.*\ :Tp,Nm:/usr/local/bin/archive %s

##Watch for big postings

watcher!:*\

:Tc,Wbnm\

:exec awk ‘$1 > 1000000 { print “BIG”, $2, $3 }’ >/dev/console

##A UUCP feed, where we try to keep the “batching” between 4 and 1K. ihnp4:/world,usa,na,ddn,gnu\

:Tf,Wfb,B4096/1024:

##Usenet as mail; note ! in funnel name to avoid Path conflicts.

##Can’t use ! in “fred” since it would like look a UUCP address. fred:!*,comp.sources.unix,comp.sources.bugs\

:Tm:mailer!

barney@bar.com:!*,news.software.nntp,comp.sources.bugs\

:Tm:mailer!

mailer!:!*\

:W*,Tp:/usr/ucb/Mail -s “News article” *

##NNTP feeds fed off-line via nntpsend or equivalent. feed1::Tf,Wnm:feed1.domain.name peer.foo.com:foo.*:Tf,Wnm:peer.foo.com

##Real-time transmission.

mit.edu:/world,usa,na,ne,ddn,gnu,inet\ :Tc,Wnm:/nntplink -i stdin mit.edu

## Two sites feeding into a hypothetical NNTP fan-out program: nic.near.net:\

:Tm:nntpfunnel1

newslog 1163

uunet.uu.net/uunet:!ne.*/world,usa,na,foo,ddn,gnu,inet\ :Tm:nntpfunnel1

nntpfunnel1:!*\

:Tc,Wmn*:/nntpfanout

## A UUCP site that wants comp.* and moderated soc groups uucpsite!comp:!*,comp.*/world,usa,na,gnu\

:Tm:uucpsite uucpsite!soc:!*,soc.*/world,usa,na,gnu\ :Tm,Nm:uucpsite

uucpsite:!*\

:Tf,Wfb:/usr/spool/batch/uucpsite

The last two sets of entries show how funnel feeds can be used. For example, the nntpfanout program would receive lines like the following on its standard input:

<123@litchi.foo.com> comp/sources/unix/888 nic.near.net uunet.uu.net <124@litchi.foo.com> ne/general/1003 nic.near.net

Because the UUCP funnel is only destined for one site, the asterisk is not needed and entries like the following will be written into the file:

<qwe#37x@snark.uu.net>comp/society/folklore/3 <123@litchi.foo.com> comp/sources/unix/888

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.

SEE ALSO

active(5), buffchan(8), ctlinnd(8), innd(8), wildmat(3)

newslog

newslog—Description of Usenet log files.

DESCRIPTION

Most log files created by Usenet programs reside in the /var/log/news directory and have a .log extension. Several versions are usually kept with an additional extension such as .1, .2, and so on; the higher the number, the older the log. The older versions are compressed.

The scanlogs script and related utilities (see newslog(8)) are responsible for rotating and compressing these files.

Some log files always have data, others only have data if there is a problem, and others are only created if a particular program is used or configuration parameter is set. The innstat script (see newslog(8)) monitors the size of all log files.

The following files will only accumulate data under the direction of control.ctl(5):

control.log, miscctl.log, newgroup.log, rmgroup.log, unwanted.log

In order to create these files, the message and action fields of control.ctl should be chosen from the following table:

Message

Action

Meaning

 

 

 

all

log=miscctl

Log all messages by default

default

log=miscctl

Log unknown messages

newgroup

doit=newgroup

Create group and log message

newgroup

log=newgroup

Log message

continues

 

Part V: File Formats

1164

 

 

 

Message

Action

Meaning

 

 

 

rmgroup

doit=rmgroup

Remove group and log message

rmgroup

log=rmgroup

Log message

“other”

doit=miscctl

Log and process the message

“other”

log=miscctl

Log message

Here, “other” refers to any other control message such as:

checkgroups ihave sendme sendsys senduuname version

The following is a list of log files.

control.log

This file maintains a count of the number of newgroup and rmgroup control messages seen for

 

each newsgroup. The count is of the number of control messages with identical arguments,

 

regardless of whether they were actually processed. All control arguments, including invalid

 

ones, are counted. This file is updated by tally.control, which is invoked by scanlogs if

 

either the newgroup or rmgroup logs exist. This file is not rotated.

errlog

This file contains the standard output and standard error of any program spawned by

 

innd(8). The most common programs are the control-message handlers found in /news/bin/

 

control. This file should be empty. Scanlogs will print the entire contents of this log file if it

 

is non-empty.

expire.log

By default, when news.daily is going to expire old news articles, it writes the date to this

 

file, followed by any output from expire(8) and the ending date. All lines but the first are

 

indented four spaces.

miscctl.log

When control.ctl is configured as described above, all control messages except newgroup

 

and rmgroup are appended to this file by writelog. There will be a summary line describing

 

the message and the action taken, followed by the article indented by four spaces and a

 

blank line.

newgroup.log

When control.ctl is configured as described above, all newgroup messages are appended to

 

this file using the same format as for miscctl.log.

news

This file logs articles received by innd. scanlogs summarizes the rejected articles reported in

 

this file.

news.crit

All critical error messages issued by innd are appended to this file via syslog(3). This log file

 

should be empty. scanlogs will print the entire contents of this log file if it is non-empty.

 

You should have the following line in your syslog.conf(5) file:

 

news.crit /var/log/news/news.crit

news.err

All major error messages issued by innd are appended to this file via syslog. This log file

 

should be empty. scanlogs will print the entire contents of this log file if it is non-empty.

 

You should have the following line in your syslog.conf file:

 

news.err /var/log/news/news.err

news.notice

All standard error messages and status messages issued by innd are appended to this file via

 

syslog. scanlogs uses the awk(1) script innlog.awk to summarize this file. You should have

 

the following line in your syslog.conf file:

 

news.notice /var/log/news/news.notice

nntpsend.log

The nntpsend(8) programs appends all status messages to this file.

rmgroup.log

When control.ctl is configured as described previously, all rmgroup messages are appended

 

to this file using the same format as for miscctl.log.

unwanted.log

This log maintains a count of the number of articles that were rejected because they were

 

posted to newsgroups that do not exist at the local site. This file is updated by

 

tally.unwanted and maintained in reverse numeric order (the most popular rejected group

 

first). This file is not rotated.

nfs 1165

HISTORY

Written by Landon Curt Noll (chongo@toad.com) and Rich $alz (rsalz@uunet.uu.net) for InterNetNews.

SEE ALSO

control.ctl(5), ctlinnd(8), expire(8), innd(8), news.daily(8), nntpsend(8), newslog(8)

nfs

nfs—NFS fstab format and options.

SYNOPSIS

/etc/fstab

DESCRIPTION

The fstab file contains information about which filesystems to mount where and with what options. For NFS mounts, it contains the server name and exported server directory to mount from, the local directory that is the mount point, and the NFS-specific options that control the way the filesystem is mounted. Here is an example from an /etc/fstab file from an NFS mount.

server:/usr/local/pub /pub nfs rsize=8192,wsize=8192,timeo=14,intr

OPTIONS

rsize=n

The number of bytes NFS uses when reading files from an NFS server. The default value is

 

dependent on the kernel, currently 1024 bytes. (However, throughput is improved greatly by

 

asking for rsize=8192.)

wsize=n

The number of bytes NFS uses when writing files to an NFS server. The default value is

 

dependent on the kernel, currently 1024 bytes. (However, throughput is improved greatly by

 

asking for wsize=8192.)

timeo=n

The value in tenths of a second before sending the first retransmission after an RPC time-

 

out. The default value is 7 tenths of a second. After the first time-out, the time-out is

 

doubled after each successive time-out until a maximum time-out of 60 seconds is reached

 

or the enough retransmissions have occurred to cause a major time-out. Then, if the

 

filesystem is hard mounted, each new time-out cascade restarts at twice the initial value of

 

the previous cascade, again doubling at each retransmission. The maximum time-out is

 

always 60 seconds. Better overall performance may be achieved by increasing the time-out

 

when mounting on a busy network, to a slow server, or through several routers or gateways.

retrans=n

The number of minor time-outs and retransmissions that must occur before a major time-

 

out occurs. The default is 3 time-outs. When a major time-out occurs, the file operation is

 

either aborted or a “server not responding” message is printed on the console.

acregmin=n

The minimum time in seconds that attributes of a regular file should be cached before

 

requesting fresh information from a server. The default is 3 seconds.

acregmax=n

The maximum time in seconds that attributes of a regular file can be cached before

 

requesting fresh information from a server. The default is 60 seconds.

acdirmin=n

The minimum time in seconds that attributes of a directory should be cached before

 

requesting fresh information from a server. The default is 30 seconds.

acdirmax=n

The maximum time in seconds that attributes of a directory can be cached before requesting

 

fresh information from a server. The default is 60 seconds.

actimeo=n

Using actimeo sets all of acregmin, acregmax, acdirmin, and acdirmax to the same value. There

 

is no default value.

 

Part V: File Formats

1166

 

 

 

retry=n

The number of times to retry a backgrounded NFS mount operation before giving up. The

 

default value is 10000 times.

namlen=n

When an NFS server does not support version 2 of the RPC mount protocol, this option

 

can be used to specify the maximum length of a filename that is supported on the remote

 

filesystem. This is used to support the POSIX pathconf functions. The default is 255

 

characters.

port=n

The numeric value of the port to connect to the NFS server on. If the port number is 0 (the

 

default) then query the remote host’s port mapper for the port number to use. If the remote

 

host’s NFS daemon is not registered with its port mapper, the standard NFS port number

 

2049 is used instead.

mountport=n

The numeric value of the mountd port.

mounthost=name

The name of the host running mountd.

mountprog=n

Use an alternate RPC program number to contact the mount daemon on the remote host.

 

This option is useful for hosts that can run multiple NFS servers. The default value is

 

100005, which is the standard RPC mount daemon program number.

mountvers=n

Use an alternate RPC version number to contact the mount daemon on the remote host.

 

This option is useful for hosts that can run multiple NFS servers. The default value is

 

version 1.

nfsprog=n

Use an alternate RPC program number to contact the NFS daemon on the remote host.

 

This option is useful for hosts that can run multiple NFS servers. The default value is

 

100003, which is the standard RPC NFS daemon program number.

nfsvers=n

Use an alternate RPC version number to contact the NFS daemon on the remote host. This

 

option is useful for hosts that can run multiple NFS servers. The default value is version 2.

bg

If the first NFS mount attempt times out, continue trying the mount in the background.

 

The default is to not to background the mount on time-out but to fail.

fg

If the first NFS mount attempt times out, fail immediately. This is the default.

soft

If an NFS file operation has a major time-out, then report an I/O error to the calling

 

program. The default is to continue retrying NFS file operations indefinitely.

hard

If an NFS file operation has a major time-out, then report “server not responding” on the

 

console and continue retrying indefinitely. This is the default.

intr

If an NFS file operation has a major time-out and it is hard mounted, then allow signals to

 

interrupt the file operation and cause it to return EINTR to the calling program. The default

 

is to not allow file operations to be interrupted.

posix

Mount the NFS filesystem using POSIX semantics. This allows an NFS filesystem to

 

properly support the POSIX pathconf command by querying the mount server for the

 

maximum length of a filename. To do this, the remote host must support version 2 of the

 

RPC mount protocol. Many NFS servers support only version 1.

nocto

Suppress the retrieval of new attributes when creating a file.

noac

Disable all forms of attribute caching entirely. This extracts a server performance penalty,

 

but it allows two different NFS clients to get reasonably good results when both clients are

 

actively writing to a common filesystem on the server.

tcp

Mount the NFS filesystem using the TCP protocol instead of the default UDP protocol.

 

Many NFS severs only support UDP.

udp

Mount the NFS filesystem using the UDP protocol. This is the default. All the non-value

 

options have corresponding nooption forms. For example, nointr means don’t allow file

 

operations to be interrupted.

FILES

 

/etc/fstab

nnrp.access 1167

SEE ALSO

fstab(5), mount(8), umount(8), exports(5)

AUTHOR

Rick Sladkey (jrs@world.std.com)

BUGS

The bg, fg, retry, posix, and nocto options are parsed by mount but currently are silently ignored. The tcp and namlen options are implemented but are not currently supported by the Linux kernel. The umount command should notify the server when an NFS filesystem is unmounted.

Linux 0.99, 20 November 1993

nnrp.access

nnrp.access—Access file for on-campus NNTP sites.

DESCRIPTION

The file /news/lib/nnrp.access specifies the access control for those NNTP sites that are not handled by the main InterNetNews daemon innd(8). The nnrpd(8) server reads it when first spawned by innd.

Comments begin with a number sign (#) and continue through the end of the line. Blank lines and comments are ignored. All other lines should consist of five fields separated by colons:

hosts:perms:username:password:patterns

The first field is a wildmat(3)-style pattern specifying the names or Internet address of a set of hosts. Before a match is checked, the client’s hostname (or its Internet address if gethostbyaddr(3) fails) is converted to lowercase. Each line is matched in turn, and the last successful match is taken as the correct one.

The second field is a set of letters specifying the permissions granted to the client. The perms should be chosen from the following set:

R

The client can retrieve articles

P

The client can post articles

The third and fourth fields specify the username and password that the client must use to authenticate themselves before the server will accept any articles. Note that no authentication (other than a matching entry in this file) is required for newsreading. If they are empty, then no password is required. Whitespace in these fields will result in the client being unable to properly authenticate themselves and may be used to disable access.

The fifth field is a set of patterns identifying the newsgroups that the client is allowed to access. The patterns are interpreted in the same manner as the newsfeeds(5) file. The default, however, denies access to all groups.

The access file is normally used to provide host-level access control for reading and posting articles. There are times, however, when this is not sufficient and user-level access control is needed. Whenever an NNTP authinfo command is used, the nnrpd server rereads this file and looks for a matching username and password. If the local newsreaders are modified to send the authinfo command, then all host entries can have no access and specific users can be granted the appropriate read and post access. For example:

##host:perm:user:pass:groups

##Default is no access.

:: -no- : -no- :!*

##FOO hosts have no password, can read anything.

.foo.com:Read Post:::*

##A related workstation can’t access FOO newsgroups. lenox.foo.net:RP:martha:hiatt:*,!foo.*

 

Part V: File Formats

1168

 

 

 

If the file contains passwords, it should not be world-readable.

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.

SEE ALSO

innd(8), newsfeeds(5), nnrpd(8), wildmat(3)

nntpsend.ctl

nntpsend.ctl—List of sites to feed via nntpsend.

DESCRIPTION

The file /news/lib/nntpsend.ctl specifies the default list of sites to be fed by nntpsend(8).

Comments begin with a number sign (#) and continue through the end of the line. Blank lines and comments are ignored. All other lines should consist of four fields separated by a colon.

The first field is the name of the site as specified in the newsfeeds(5) file.

The second field should be the hostname or IP address of the remote site.

The third field, if non-empty, specifies the default tail truncation size of site’s batchfile. This is passed to shrinkfile as the –s flag. If this field is empty, no truncation is performed.

The fourth field specifies some default flags passed to innxmit(8). The flag –a is always given to innxmit and need not appear here. If no –t timeout flag is given in this field and on the nntpsend command line, –t 180 will be given to innxmit.

HISTORY

Written by Landon Curt Noll (chongo@toad.com) for InterNetNews.

SEE ALSO

innxmit(8), newsfeeds(5), nntpsend(8), trunc(1)

nologin

nologin—Prevent usual users from logging into the system.

DESCRIPTION

If the file /etc/nologin exists, login(1) will allow access only to root. Other users will be shown the contents of this file and their logins refused.

FILES

/etc/nologin

SEE ALSO

login(1), shutdown(8)

Linux, 29 December 1992

overview.fmt

overview.fmt—Format of news overview database.

passwd 1169

DESCRIPTION

The file /news/lib/overview.fmt specifies the organization of the news overview database. Blank lines and lines beginning with a number sign (#) are ignored. The order of lines in this file is important; it determines the order in which the fields will appear in the database.

Most lines will consist of an article header name, optionally followed by a colon. A trailing set of lines can have the word full appear after the colon; this indicates that the header should appear as well as its value.

If this file is changed, it is usually necessary to rebuild the existing overview database using expireover(8) after removing all existing overview files.

The default file, show here, is compatible with Geoff Collyer’s nov package:

Subject:

From:

Date: Message-ID: References: Bytes: Lines:

## Some newsreaders get better performance if Xref is present #Xref:full

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews. Intended to be compatible with the nov package written by Geoff Collyer (geoff@world.std.com).

passwd

passwd—Password file.

DESCRIPTION

passwd is an ASCII file that contains a list of the system’s users and the passwords they must use for access. The password file should have general read permission (many utilities, such as ls(1), use it to map user IDs to usernames) but write access only for the superuser.

In the good old days, there was no great problem with this general read permission. Everybody could read the encrypted passwords, but the hardware was too slow to crack a well-chosen password, and moreover, the basic assumption used to be that of a friendly user community. These days, many people run some version of the shadow password suite, where /etc/ passwd has *s instead of passwords, and the encrypted passwords are in /etc/shadow, which is readable by root only.

When you create a new login, leave the password field empty and use passwd(1) to fill it. A star (*) in the password field means that this user cannot log in via login(1).

There is one entry per line, and each line has the format:

login_name:passwd:UID:GID:user_name:directory:shell

The field descriptions are

 

login_name

The name of the user on the system.

password

The encrypted optional user password.

UID

The numerical user ID.

GID

The numerical group ID for this user.

user_name

The (optional) comment field (often a full username).

directory

The user’s $HOME directory.

shell

The program to run at login (if empty, use /bin/sh).

 

Part V: File Formats

1170

 

 

 

NOTE

If your root file system is on /dev/ram, you must save a changed password file to your root filesystem floppy before you shut down the system and check the access rights. If you want to create user groups, their GIDs must be equal and there must be an entry in /etc/group, or no group will exist.

FILES

/etc/passwd

SEE ALSO

passwd(1), login(1), group(5), shadow(5)

Linux, 24 July 1993

passwd.nntp

passwd.nntp—Passwords for connecting to remote NNTP servers.

DESCRIPTION

The file /news/lib/passwd.nntp contains host-name-password triplets for use when authenticating client programs to NNTP servers. This file is normally interpreted by the NNTPsend-password routine in libinn(3). Blank lines and lines beginning with a number sign (#) are ignored. All other lines should consist of three or fields separated by colons:

host:name:password host:name:password:style

The first field is the name of a host and is matched in a case-insensitive manner. The second field is a username, and the third is a password. The optional fourth field specifies the type of authentication to use. The default is authinfo, which means that NNTP authinfo commands are used to authenticate to the remote host. If either the username or password are empty, then the related command will not be sent. (The authinfo command is a common extension to RFC 977.) For example:

## UUNET needs a password, MIT doesn’t. mit.edu:bbn::authinfo uunet.uu.net:bbn:yoyoma:authinfo

This file should not be world-readable.

HISTORY

Written by Rich $alz (rsalz@uunet.uu.net) for InterNetNews.

SEE ALSO

innd(8), libinn(3)

pbm

pbm—Portable bitmap file format.

DESCRIPTION

The portable bitmap format is a lowest common denominator monochrome file format. It was originally designed to make it reasonable to mail bitmaps between different types of machines using the typical stupid network mailers we have today. Now it serves as the common language of a large family of bitmap conversion filters. The definition is as follows:

A “magic number” for identifying the file type. A pbm file’s magic number is the two characters P1.

pgm 1171

Whitespace (blanks, Tabs, CRs, LFs).

A width, formatted as ASCII characters in decimal. Whitespace.

A height, again in ASCII decimal. Whitespace.

Width * height bits, each either 1 or 0, starting at the top-left corner of the bitmap, proceeding in normal English reading order.

The character 1 means black; 0 means white. Whitespace in the bits section is ignored.

Characters from a # to the next end-of-line are ignored (comments). No line should be longer than 70 characters.

Here is an example of a small bitmap in this format:

P1

# feep.pbm 24 7

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0

0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0

0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0

0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0

0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Programs that read this format should be as lenient as possible, accepting anything that looks remotely like a bitmap.

There is also a variant on the format, available by setting the RAWBITS option at compile time. This variant is different in the following ways:

The “magic number” is P4 instead of P1.

The bits are stored eight per byte, high bit first and low bit last.

No whitespace is allowed in the bits section, and only a single character of whitespace (typically a newline) is allowed after the height.

The files are eight times smaller and many times faster to read and write.

SEE ALSO

atktopbm(1), brushtopbm(1), cmuwmtopbm(1), g3topbm(1), gemtopbm(1), icontopbm(1), macptopbm(1), mgrtopbm(1), pi3topbm(1), xbmtopbm(1), ybmtopbm(1), pbmto10x(1), pnmtoascii(1), pbmtoatk(1), pbmtobbnbg(1), pbmtocmuwm(1), pbmtoepson(1), pbmtog3(1), pbmtogem(1), pbmtogo(1), pbmtoicon(1), pbmtolj(1), pbmtomacp(1), pbmtomgr(1), pbmtopi3(1), pbmtoplot(1), pbmtoptx(1), pbmtox10bm(1), pbmtoxbm(1), pbmtoybm(1), pbmtozinc(1), pbmlife(1), pbmmake(1), pbmmask(1), pbmreduce(1), pbmtext(1), pbmupc(1), pnm(5), pgm(5), ppm(5)

AUTHOR

Copyright 1989, 1991 by Jef Poskanzer.

27 September 1991

pgm

pgm—Portable graymap file format.

 

Part V: File Formats

1172

 

 

 

DESCRIPTION

The portable graymap format is a lowest common denominator grayscale file format. The definition is as follows:

A “magic number” for identifying the file type. A pgm file’s magic number is the two characters P2. Whitespace (blanks, Tabs, CRs, LFs).

A width, formatted as ASCII characters in decimal. Whitespace.

A height, again in ASCII decimal. Whitespace.

The maximum gray value, again in ASCII decimal. Whitespace.

Width * height gray values, each in ASCII decimal, between 0 and the specified maximum value, separated by whitespace, starting at the top-left corner of the graymap, proceeding in normal English reading order. A value of 0 means black, and the maximum value means white.

Characters from a # to the next end-of-line are ignored (comments). No line should be longer than 70 characters.

Here is an example of a small graymap in this format:

P2

 

# feep.pgm

24

7

15

 

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

 

 

 

0

3

3

3

3

0

0

7

7

7

7

0

0

11

11

 

1111

0

0

15

1515

 

15

0

0

3

0

0

0

0

0

7

0

0

0

0

0

11

0

0

0

0

0

15

0

0

150

 

 

0

3

3

3

0

0

0

7

7

7

0

0

0

11

11

 

110

0

0

15

15

15

 

150

 

0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0

 

 

0

3

0

0

0

0

0

7

7

7

7

0

0

11

11

 

1111

0

0

15

0

0

0

0

 

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

 

 

 

Programs that read this format should be as lenient as possible, accepting anything that looks remotely like a graymap.

There is also a variant on the format, available by setting the RAWBITS option at compile time. This variant is different in the following ways:

The “magic number” is P5 instead of P2.

The gray values are stored as plain bytes, instead of ASCII decimal.

No whitespace is allowed in the grays section, and only a single character of whitespace (typically a newline) is allowed after the maxval.

The files are smaller and many times faster to read and write.

Note that this raw format can only be used for maxvals less than or equal to 255. If you use the pgm library and try to write a file with a larger maxval, it will automatically fall back on the slower but more general plain format.

SEE ALSO

fitstopgm(1), fstopgm(1), hipstopgm(1), lispmtopgm(1), psidtopgm(1), rawtopgm(1), pgmbentley(1), pgmcrater(1), pgmedge(1), pgmenhance(1), pgmhist(1), pgmnorm(1), pgmoil(1), pgmramp(1), pgmtexture(1), pgmtofits(1), pgmtofs(1), pgmtolispm(1), pgmtopbm(1), pnm(5), pbm(5), ppm(5)

AUTHOR

Copyright 1989, 1991 by Jef Poskanzer.

12 November 1991

ppm 1173

pnm

pnm—Portable anymap file format.

DESCRIPTION

The pnm programs operate on portable bitmaps, graymaps, and pixmaps produced by the pbm, pgm, and ppm segments. There is no file format associated with pnm itself.

SEE ALSO

anytopnm(1), rasttopnm(1), tifftopnm(1), xwdtopnm(1), pnmtops(1), pnmtorast(1), pnmtotiff(1), pnmtoxwd(1), pnmarith(1), pnmcat(1), pnmconvol(1), pnmcrop(1), pnmcut(1), pnmdepth(1), pnmenlarge(1), pnmfile(1), pnmflip(1), pnmgamma(1), pnmindex(1), pnminvert(1), pnmmargin(1), pnmnoraw(1), pnmpaste(1), pnmrotate(1), pnmscale(1), pnmshear(1), pnmsmooth(1), pnmtile(1), ppm(5), pgm(5), pbm(5)

AUTHOR

Copyright 1989, 1991 by Jef Poskanzer.

27 September 1991

ppm

ppm—Portable pixmap file format.

DESCRIPTION

The portable pixmap format is a lowest common denominator color image file format. The definition is as follows:

A “magic number” for identifying the file type. A ppm file’s magic number is the two characters P3. Whitespace (blanks, Tabs, CRs, LFs).

A width, formatted as ASCII characters in decimal. Whitespace.

A height, again in ASCII decimal. Whitespace.

The maximum color-component value, again in ASCII decimal. Whitespace.

Width * height pixels, each three ASCII decimal values between 0 and the specified maximum value, starting at the top-left corner of the pixmap, proceeding in normal English reading order. The three values for each pixel represent red, green, and blue; a value of 0 means that color is off, and the maximum value means that color is maxed out.

Characters from a # to the next end-of-line are ignored (comments). No line should be longer than 70 characters.

Here is an example of a small pixmap in this format:

P3

# feep.ppm 4 4 15

0 0 0 0 0 0 0 0 0 15 0 15

0 0 0 0 15 7 0 0 0 0 0 0

0 0 0 0 0 0 0 15 7 0 0 0

15 0 150 0 0 00 0 0 0 0

Programs that read this format should be as lenient as possible, accepting anything that looks remotely like a pixmap.

 

Part V: File Formats

1174

 

 

 

There is also a variant on the format, available by setting the RAWBITS option at compile time. This variant is different in the following ways:

The “magic number” is P6 instead of P3.

The pixel values are stored as plain bytes, instead of ASCII decimal.

Whitespace is not allowed in the pixels area, and only a single character of whitespace (typically a newline) is allowed after the maxval.

The files are smaller and many times faster to read and write.

Note that this raw format can only be used for maxvals less than or equal to 255. If you use the ppm library and try to write a file with a larger maxval, it will automatically fall back on the slower but more general plain format.

SEE ALSO

giftoppm(1), gouldtoppm(1), ilbmtoppm(1), imgtoppm(1), mtvtoppm(1), pcxtoppm(1), pgmtoppm(1), pi1toppm(1), picttoppm(1), pjtoppm(1), qrttoppm(1), rawtoppm(1), rgb3toppm(1), sldtoppm(1), spctoppm(1), sputoppm(1), tgatoppm(1), ximtoppm(1), xpmtoppm(1), yuvtoppm(1), ppmtoacad(1), ppmtogif(1), ppmtoicr(1), ppmtoilbm(1), ppmtopcx(1), ppmtopgm(1), ppmtopi1(1), ppmtopict(1), ppmtopj(1), ppmtopuzz(1), ppmtorgb3(1), ppmtosixel(1), ppmtotga(1), ppmtouil(1), ppmtoxpm(1), ppmtoyuv(1), ppmdither(1), ppmforge(1), ppmhist(1), ppmmake(1), ppmpat(1), ppmquant(1), ppmquantall(1), ppmrelief(1), pnm(5), pgm(5), pbm(5)

AUTHOR

Copyright 1989, 1991 by Jef Poskanzer.

27 September 1991

/proc

/proc—Process information pseudo-filesystem.

DESCRIPTION

/proc is a pseudo-filesystem that is used as an interface to kernel data structures rather than reading and interpreting /dev/ kmem. Most of it is read-only, but some files allow kernel variables to be changed.

The following outline gives a quick tour through the /proc hierarchy.

[number]

There is a numerical subdirectory for each running process; the subdirectory is named by the

 

process ID. Each contains the following pseudo-files and directories.

cmdline

This holds the complete command line for the process, unless the whole process has been swapped

 

out or unless the process is a zombie. In either of these later cases, there is nothing in this file: That

 

is, a read on this file will return as having read 0 characters. This file is null-terminated but not

 

newline-terminated.

cwd

This is a link current working directory of the process. To find out the cwd of process 20, for

 

instance, you can do this: cd /proc/20/cwd; /bin/pwd. Note that the pwd command is often a shell

 

built in and might not work properly in this context.

environ

This file contains the environment for the process. The entries are separated by null characters, and

 

there may be a null character at the end. Thus, to print out the environment of process 1, you

 

would do

 

(cat /proc/1/environ; echo) | tr “\000” “\n”

 

For a reason why one should want to do this, see lilo(8).

exe

A pointer to the binary that was executed and appears as a symbolic link. readlink(2) on the exe

 

special file returns a string in the format:

 

[device]:inode

 

For example, [0301]:1502 is inode 1502 on device major 03 (IDE, MFM, and so on drives), minor

/proc 1175

01 (first partition on the first drive). Also, the symbolic link can be dereferenced normally; attempting to open exe will open the executable. You can even type /proc/[number]/exe to run another copy of the same process as [number].

 

 

find(1) with the -inum option can be used to locate the file.

 

 

fd

 

This is a subdirectory containing one entry for each file that the process has open, named by its file

 

 

descriptor, and that is a symbolic link to the actual file (as the exe entry does). Thus, 0 is standard

 

 

input, 1 standard output, 2 standard error, and so on.

 

 

 

 

Programs that will take a filename but will not take the standard input and that write to a file but

 

 

will not send their output to standard output can be effectively foiled this way, assuming that -i is

 

 

the flag designating an input file and -o is the flag designating an output file:

 

 

 

foobar -i /proc/self/fd/0 -o /proc/self/fd/1 ...

 

 

 

 

and you have a working filter. Note that this will not work for programs that seek on their files

 

 

because the files in the fd directory are not seekable.

 

 

 

 

/proc/self/fd/N is approximately the same as /dev/fd/N in some UNIX and UNIX-like systems.

 

 

Most Linux MAKEDEV scripts symbolically link /dev/fd to /proc/self/fd, in fact.

 

maps

 

A file containing the currently mapped memory regions and their access permissions.

 

 

The format is

 

 

 

 

 

 

address

perms

offset

dev

inode

 

 

 

 

 

 

 

 

 

00000000-0002f000

r-x–

00000400

03:03

1401

 

 

0002f000-00032000

rwx-p

0002f400

03:03

1401

 

 

00032000-0005b000

rwx-p

00000000

00:00

0

 

60000000-60098000

rwx-p

00000400

03:03

215

 

 

60098000-600c7000

rwx-p

00000000

00:00

0

 

 

bfffa000-c0000000

rwx-p

00000000

00:00

0

 

 

 

 

address is the address space in the process that it occupies. perms is a set of permissions: r = read, w

 

 

= write, x = execute, s = shared, p = private (copy on write).

 

 

 

 

offset is the offset into the file/whatever, dev is the device (major: minor), and inode is the inode

 

 

on that device. 0 indicates that no inode is associated with the memory region, as the case would be

 

 

with bss.

 

 

 

 

mem

 

This is not the same as the mem (1,1) device, despite the fact that it has the same device numbers.

 

 

The /dev/mem device is the physical memory before any address translation is done, but the mem file

 

 

here is the memory of the process that accesses it. This cannot be mmap(2)ed currently, and will not

 

 

be until a general mmap(2) is added to the kernel. (This might have happened by the time you read

 

 

this.)

 

 

 

 

mmap

 

Directory of maps by mmap(2) that are symbolic links such as exe, fd/*, and so on. Note that maps

 

 

includes a superset of this information, so /proc/*/mmap should be considered obsolete.

 

 

0 is usually libc.so.4.

 

 

 

 

 

 

/proc/*/mmap was removed in Linux kernel version 1.1.40. (It really was obsolete!)

 

root

 

UNIX and Linux support the idea of a per-process root of the filesystem, set by the chroot(2)

 

 

system call. root points to the filesystem root and behaves as exe, fd/*, and so on do.

stat

 

Status information about the process. This is used by ps(1). The fields, in order, with their proper

 

 

scanf(3) format specifiers, are

 

 

 

 

 

pid %d

The process ID.

 

 

 

 

 

comm %s

The filename of the executable in parentheses. This is visible whether or not

 

 

 

the executable is swapped out.

 

 

 

Part V: File Formats

1176

 

 

 

state %c

One character from the string RSDZT where R is running, S is sleeping in an

 

interruptible wait, D is sleeping in an uninterruptible wait or swapping, Z is

 

zombie, and T is traced or stopped (on a signal).

ppid %d

The PID of the parent.

pgrp %d

The process group ID of the process.

session %d

The session ID of the process.

tty %d

The tty the process uses.

tpgid %d

The process group ID of the process that currently owns the tty that the

 

process is connected to.

flags %u

The flags of the process. Currently, every flag has the math bit set because

 

crt0.s checks for math emulation, so this is not included in the output. This

 

is probably a bug because not every process is a compiled C program. The

 

math bit should be a decimal 4, and the traced bit is decimal 10.

minflt %u

The number of minor faults the process has made, those that have not

 

required loading a memory page from disk.

cminflt %u majflt %u

The number of minor faults that the process and its children have made.

The number of major faults the process has made, those that have required loading a memory page from disk.

cmajflt %u utime %d stime %d cutime %d

The number of major faults that the process and its children have made. The number of jiffies that this process has been scheduled in user mode. The number of jiffies that this process has been scheduled in kernel mode.

The number of jiffies that this process and its children have been scheduled in user mode.

cstime %d

The number of jiffies that this process and its children have been scheduled

 

in kernel mode.

counter %d

The current maximum size in jiffies of the process’s next timeslice, or what is currently left of its current timeslice if it is the currently running process.

priority %d

The standard nice value, plus fifteen. The value is never negative in the kernel.

timeout %u

The time in jiffies of the process’s next time-out.

itrealvalue %u

The time (in jiffies) before the next SIGALRM is sent to the process due to an

 

interval timer.

starttime %d vsize %u rss %u

Time the process started in jiffies after system boot. Virtual memory size.

Resident set size: Number of pages the process has in real memory, minus 3 for administrative purposes. This is just the pages that count toward text, data, or stack space. This does not include pages that have not been demandloaded in or that are swapped out.

rlim %u

Current limit in bytes on the rss of the process (usually 2,147,483,647).

startcode %u

The address above which program text can run.

endcode %u

The address below which program text can run.

startstack %u

The address of the start of the stack.

kstkesp %u

The current value of esp (32-bit stack pointer), as found in the kernel stack

 

page for the process.

kstkeip %u

The current EIP (32-bit instruction pointer).

signal %d

The bitmap of pending signals (usually 0).

blocked %d

The bitmap of blocked signals (usually 0, 2 for shells).

 

 

 

 

 

/proc

 

 

 

 

 

 

 

 

 

1177

 

 

 

 

 

 

 

 

sigignore %d

The bitmap of ignored signals.

 

 

 

 

 

 

 

 

 

 

sigcatch %d

The bitmap of catched signals.

 

 

 

 

 

wchan %u

This is the “channel” in which the process is waiting. This is the address of a

 

 

 

system call and can be looked up in a name list if you need a textual name. (If

 

 

 

you have an up-to-date /etc/psdatabase, then try ps -l to see the WCHAN field

 

 

 

in action.)

 

 

 

 

 

cpuinfo

This is a collection of CPU and system architecture dependent items; for each supported architec-

 

ture is a different list. The only two common entries are cpu, which is the CPU currently in use,

 

 

 

and BogoMIPS, a system constant that is calculated during kernel initialization.

 

 

devices

Text listing of major numbers and device groups. This can be used by MAKEDEV scripts for consis-

 

 

 

tency with the kernel.

 

 

 

 

 

 

dma

This is a list of the registered ISA DMA (direct memory access) channels in use.

 

 

filesystems

A text listing of the filesystems that were compiled into the kernel. Incidentally, this is used by

 

 

 

mount(1) to cycle through different filesystems when none is specified.

 

 

interrupts

This is used to record the number of interrupts per each IRQ on (at least) the i386 architecture.

 

 

 

Very easy to read formatting done in ASCII.

 

 

 

 

 

ioports

This is a list of currently registered input-output port regions that are in use.

 

 

kcore

This file represents the physical memory of the system and is stored in the core file format. With

 

 

 

this pseudo-file and an unstripped kernel (/usr/src/linux/tools/zSystem) binary, GDB can be used

 

 

 

to examine the current state of any kernel data structures.

 

 

 

 

 

The total length of the file is the size of physical memory (RAM) plus 4KB.

 

 

kmsg

This file can be used instead of the syslog(2) system call to log kernel messages. A process must

 

 

 

have superuser privileges to read this file, and only one process should read this file. This file should

 

not be read if a syslog process is running that uses the syslog(2) system call facility to log kernel

 

 

 

messages.

 

 

 

 

 

 

 

Information in this file is retrieved with the dmesg(8) program.

 

 

 

 

ksyms

This holds the kernel exported symbol definitions used by the modules(X) tools to dynamically link

 

and bind loadable modules.

 

 

 

 

 

loadavg

The load average numbers give the number of jobs in the run queue averaged over 1, 5, and 15

 

 

 

minutes. They are the same as the load average numbers given by uptime(1) and other programs.

 

 

malloc

This file is only present if CONFIGDEBUGMALLOC was defined during compilation.

 

 

meminfo

This is used by free(1) to report the amount of free and used memory (both physical and swap) on

 

the system as well as the shared memory and buffers used by the kernel.

 

 

 

It is in the same format as free(1) except in bytes rather than KB.

 

 

 

 

modules

A text list of the modules that have been loaded by the system.

 

 

 

 

net

Various net pseudo-files, all of which give the status of some part of the networking layer. These

 

 

 

files contain ASCII structures and are therefore readable with cat. However, the standard

 

 

 

netstat(8) suite provides much cleaner access to these files.

 

 

 

 

arp

This holds an ASCII readable dump of the kernel ARP table used for address resolutions. It will

 

 

 

show both dynamically learned and pre-programmed ARP entries. The format is

 

 

 

 

IP address

HW type

Flags

HW address

 

 

 

 

 

 

 

 

 

 

 

10.11.100.129

0x1

0x6

00:20:8A:00:0C:5A

 

 

 

10.11.100.5

0x1

0x2

00:C0:EA:00:00:4E

 

 

 

44.131.10.6

0x3

0x2

GW4PTS

 

 

IP address is the IPv4 address of the machine. The HW type is the hardware type of the address from RFC 826. The flags are the internal flags of the ARP structure (as defined in /usr/include/linux/ if_arp.h) and the HW address is the physical layer mapping for that IP address if it is known.

 

Part V: File Formats

1178

 

 

 

dev

The dev pseudo-file contains network device status information. This gives the number of received

 

and sent packets, the number of errors and collisions, and other basic statistics. These are used by

 

the ifconfig(8) program to report device status. The format is

 

 

 

 

Inter-| Receive

 

 

 

 

 

| Transmit

 

 

 

 

 

 

 

face

 

|packets errs drop fifo frame|packets errs drop fifo colls carrier

 

 

lo:

 

0

 

0

0

0

0

 

2353

0

0

0

0

0

 

 

eth0:

644324

1

0

0

1

 

563770

0

0

0

581

0

 

ipx

No information.

 

 

 

 

 

 

 

 

 

 

 

 

 

ipx_route

No information.

 

 

 

 

 

 

 

 

 

 

 

 

 

rarp

This file uses the same format as the ARP file and contains the current reverse mapping database

 

used to provide rarp(8) reverse address lookup services. If rarp is not configured into the kernel,

 

this file will not be present.

 

 

 

 

 

 

 

 

 

 

raw

Holds a dump of the RAW socket table. Much of the information is not of use apart from

 

debugging. The sl value is the kernel hash slot for the socket; the local_address is the local address

 

and protocol number pair. St is the internal status of the socket. The tx_queue and rx_queue are the

 

outgoing and incoming data queue in terms of kernel memory usage. The tr, tm->when, and rexmits

 

fields are not used by RAW. The uid field holds the creator euid of the socket.

 

route

No information but looks similar to route(8).

 

 

 

 

 

 

snmp

This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP management information

 

bases for an snmp agent. As of writing, the TCP mib is incomplete. It should be completed by 1.2.0.

tcp

Holds a dump of the TCP socket table. Much of the information is not of use apart from

 

debugging. The sl value is the kernel hash slot for the socket; the local_address is the local address

 

and port number pair. The remote_address is the remote address and port number pair (if

 

connected). St is the internal status of the socket. The tx_queue and rx_queue are the outgoing and

 

incoming data queue in terms of kernel memory usage. The tr, tm->when, and rexmits fields hold

 

internal information of the kernel socket state and are only useful for debugging. The uid field

 

holds the creator euid of the socket.

 

 

 

 

 

 

 

 

 

udp

Holds a dump of the UDP socket table. Much of the information is not of use apart from

 

debugging. The sl value is the kernel hash slot for the socket; the local_address is the local address

 

and port number pair. The remote_address is the remote address and port number pair (if

 

connected). St is the internal status of the socket. The tx_queue and rx_queue are the outgoing and

 

incoming data queue in terms of kernel memory usage. The tr, tm->when, and rexmits fields are not

 

used by UDP. The uid field holds the creator euid of the socket. The format is

 

sl local_address rem_address

st tx_queue rx_queue tr rexmits tm->when uid

 

1: 01642C89:0201 0C642C89:03FF

01 00000000:00000001 01:000071BA 00000000 0

 

1: 00000000:0801

 

00000000:0000

0A

00000000:00000000

00:00000000

6F000100

0

 

1: 00000000:0201

 

00000000:0000

0A

00000000:00000000

00:00000000

00000000

0

unix

Lists the UNIX domain sockets present within the system and their status. The format is

 

Num

RefCount Protocol Flags

Type St Path

 

 

 

 

 

 

 

0:

00000002

00000000

00000000

0001

03

 

 

 

 

 

 

 

 

1:

00000001

00000000

00010000

0001

01

/dev/printer

 

 

 

 

Num is the kernel table slot number, RefCount is the number of users of the socket, Protocol is currently always 0, and Flags represents the internal kernel flags holding the status of the socket. Type is currently always 1 (UNIX domain datagram sockets are not yet supported in the kernel). St is the internal state of the socket and Path is the bound path (if any) of the socket.

 

/proc

 

 

 

 

1179

 

 

 

 

 

 

 

pci

This is a listing of all PCI devices found during kernel initialization and their configuration.

 

scsi

A directory with the SCSI mid-level pseudo-file and various SCSI low-level driver directories,

 

 

which contain a file for each SCSI host in this system, all of which give the status of some part

 

of the SCSI IO subsystem. These files contain ASCII structures and are therefore readable with

 

cat.

 

 

You can also write to some of the files to reconfigure the subsystem or switch certain features on

 

or off.

 

scsi/scsi

This is a listing of all SCSI devices known to the kernel. The listing is similar to the one seen

 

 

during bootup. scsi currently supports only the single device command, which allows root to

 

 

add a hot-plugged device to the list of known devices.

 

 

An echo ‘scsisingledevice1 0 5 0’> /proc/scsi/scsi will cause host scsi1 to scan on SCSI

 

 

channel 0 for a device on ID 5 LUN 0. If there is already a device known on this address or the

 

address is invalid, an error will be returned.

 

drivername

drivername can currently be NCR53c7xx, aha152x, aha1542, aha1740, aic7xxx, buslogic, eata_dma,

 

 

eata_pio, fdomain, in2000, pas16, qlogic, scsi_debug, seagate, t128, u15-24f, ultrastor, or

 

 

wd7000. These directories show up for all drivers that registered at least one SCSI HBA. Every

 

 

directory contains one file per registered host. Every host-file is named after the number the

 

 

host got assigned during initialization.

 

 

Reading these files will usually show driver and host configuration, statistics, and so on.

 

 

Writing to these files allows different things on different hosts. For example, with the latency

 

 

and nolatency commands, root can switch on and off command latency measurement code in

 

 

the eata_dma driver. With the lockup and unlock commands, root can control bus lockups

 

 

simulated by the scsi_debug driver.

 

self

This directory refers to the process accessing the /proc filesystem and is identical to the /proc

 

 

directory named by the process ID of the same process.

 

stat

kernel/system statistics.

 

cpu 3357 0 4313 1362393

The number of jiffies (1/100ths of a second) that the system spent in user mode, user mode

 

 

with low priority (nice), system mode, and the idle task. The last value should be 100 times the

 

second entry in the uptime pseudo-file.

 

disk 0 0 0 0

The four disk entries are not implemented at this time. I’m not even sure what this should be because kernel statistics on other machines usually track both transfer rate and I/Os per second and this only allows for one field per drive.

page 5741 1808

The number of pages the system paged in and the number that were paged out (from disk).

swap 1 0

The number of swap pages that have been brought in and out.

intr 1462898

The number of interrupts received from the system boot.

ctxt 115315

The number of context switches that the system underwent.

btime 769041601

Boot time in seconds since the epoch (January 1, 1970).

sys

This directory (present since 1.3.57) contains a number of files and subdirectories correspond-

 

ing to kernel variables. These variables can be read and sometimes modified using the proc

 

filesystem and using the sysctl(2) system call. Presently, there are subdirectories kernel, net,

 

and vm that each contain more files and subdirectories.

kernel

This contains the files domainname, file-max, file-nr, hostname, inode-max, inode-nr, osrelease,

 

ostype, panic, real-root-dev, securelevel, and version, with function fairly clear from the

 

name.

 

The (read-only) file file-nr gives the number of files presently opened. The file file-max gives

 

the maximum number of open files the kernel is willing to handle. If 1024 is not enough for

 

you, try echo 4096 > /proc/sys/kernel/file-max.

 

Similarly, the files inode-nr and inode-max indicate the present and the maximum number of

 

inodes.

 

Part V: File Formats

1180

 

 

 

 

The files ostype, osrelease, and version give substrings of /proc/version.

 

The file panic gives r/w access to the kernel variable panic_timeout. If this is zero, the kernel will

 

loop on a panic; if nonzero, it indicates that the kernel should autoreboot after this number of

 

minutes.

 

The file securelevel seems rather meaningless at present; root is just too powerful.

uptime

This file contains two numbers: the uptime of the system (seconds) and the amount of time

 

spent in idle process (seconds).

version

This string identifies the kernel version that is currently running. For instance:

 

Linux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994

SEE ALSO

cat(1), find(1), free(1), mount(1), ps(1), tr(1), uptime(1), readlink(2), mmap(2), chroot(2), syslog(2), hier(7), arp(8), dmesg(8), netstat(8), route(8), ifconfig(8), procinfo(8) and much more

CONFORMS TO

This roughly conforms to a Linux 1.3.11 kernel. Please update this as necessary! Last updated for Linux 1.3.11.

CAVEATS

Note that many strings (the environment and command line) are in the internal format, with subfields terminated by null bytes, so you might find that things are more readable if you use od -c or tr “\000” “\n” to read them.

This manual page is incomplete, possibly inaccurate, and is the kind of thing that needs to be updated very often.

BUGS

The /proc filesystem may introduce security holes into processes running with chroot(2). For example, if /proc is mounted in the chroot hierarchy, a chdir(2) to /proc/1/root will return to the original root of the filesystem. This may be considered a feature instead of a bug because Linux does not yet support the fchroot(2) call.

22 July 1996

protocols

protocols—The protocols definition file.

DESCRIPTION

This file is a plain ASCII file, describing the various DARPA Internet protocols that are available from the TCP/IP subsystem. It should be consulted instead of using the numbers in the ARPA include files or, even worse, just guessing them. These numbers will occur in the protocol field of any IP header.

Keep this file untouched because changes would result in incorrect IP packages. Protocol numbers and names are specified by the DDN Network Information Center.

Each line is of the following format:

protocol number aliases ...

The fields are delimited by spaces or tabs. Empty lines and lines starting with a hash mark (#) are ignored. Remainder of lines are also ignored from the occurrence of a hash mark.

The field descriptions are

 

protocol

The native name for the protocol—for example, ip, tcp, or udp.

number

The official number for this protocol as it will appear within the IP header.

aliases

Optional aliases for the protocol.

rcsfile 1181

This file might be distributed over a network using a network-wide naming service such as Yellow Pages/NIS or BIND/ Hesoid.

FILES

/etc/protocols

The protocols definition file.

SEE ALSO

getprotoent(3), Guide to Yellow Pages Service, Guide to BIND/Hesiod Service

Linux, 18 October 1995

rcsfile

rcsfile—Format of RCS file.

DESCRIPTION

An RCS file’s contents are described by the grammar below.

The text is free format: space, backspace, tab, newline, vertical tab, form feed, and carriage return (collectively, whitespace) have no significance except in strings. However, whitespace cannot appear within an ID, num, or sym, and an RCS file must end with a newline.

Strings are enclosed by @. If a string contains a @, it must be doubled; otherwise, strings can contain arbitrary binary data.

The meta syntax uses the following conventions: | (bar) separates alternatives; { and } enclose optional phrases. { and }* enclose phrases that can be repeated zero or more times. { and {+ enclose phrases that must appear at least once and can be repeated. Terminal symbols are in boldface; non-terminal symbols are in italics.

rcstext ::= admin {delta}* desc {deltatext}* admin ::= head {num};

{branch {num}; } access {id}*; symbols {sym : num}*;

locks {id : num}*; {strict ;}

{comment {string}; }

{expand {string}; }

{newphrase }*

delta ::= num

date num; author id; state {id}; branches {num}*; next {num};

{ new-phrase }* desc ::= desc string deltatext ::= num

log string

{ newphrase }* text string

num ::= {digit | .}+

digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 id ::= {num} idchar {idchar | num}*

sym ::= {digit}* idchar {idchar | digit}*

idchar ::= any visible graphic character except special special ::= $ | , | . | : | ; | @

string ::= @{any character, with @doubled}*@

1182

Part V: File Formats

 

newphrase ::= id word* ;

word ::= id | num | string | :

Identifiers are case sensitive. Keywords are in lowercase only. The sets of keywords and identifiers can overlap. In most environments, RCS uses the ISO8859/1 encoding: visible graphic characters are codes 041–176 and 240–377, and whitespace characters are codes 010–015 and 040.

Dates, which appear after the date keyword, are of the form Y.mm.dd.hh.mm.ss, where Y is the year, mm the month (01–12), dd the day (01–31), hh the hour (00–23), mm the minute (00–59), and ss the second (00–60). Y contains just the last two digits of the year for years from 1900 through 1999, and all the digits of years thereafter. Dates use the Gregorian calendar; times use UTC.

The newphrase productions in the grammar are reserved for future extensions to the format of RCS files. No newphrase will begin with any keyword already in use.

The delta nodes form a tree. All nodes whose numbers consist of a single pair (such as 2.3, 2.1, 1.3, and so on) are on the trunk and are linked through the next field in order of decreasing numbers. The head field in the admin node points to the head of that sequence (contains the highest pair). The branch node in the admin node indicates the default branch (or revision) for most RCS operations. If empty, the default branch is the highest branch on the trunk.

All delta nodes whose numbers consist of 2n fields (n2) (such as 3.1.1.1, 2.1.2.2, and so on) are linked as follows. All nodes whose first 2n–1 number fields are identical are linked through the next field in order of increasing numbers. For each such sequence, the delta node whose number is identical to the first 2n–2 number fields of the deltas on that sequence is called the branchpoint. The branches field of a node contains a list of the numbers of the first nodes of all sequences for which it is a branchpoint. This list is ordered in increasing numbers.

The following diagram shows an example of an RCS file’s organization.

 

 

 

 

 

Head

 

 

 

 

 

 

 

 

 

 

|

 

 

 

 

 

 

 

 

 

 

|

 

 

 

 

 

 

 

 

 

 

v

 

 

 

 

/ \

 

 

 

 

--------

 

 

 

 

/

\

 

/ \

 

/ \

|

 

|

 

/ \

/

\

/

\

/

\

|

2.1

|

/

\

/

\

/

\

/

\

|

 

|

/

\

/

\

/1.2.1.3\

/1.3.1.1\

|

 

|

/1.2.2.2\

/1.2.2.1.1.1\

---------

 

---------

---------

---------

-------------

 

ˆ

 

ˆ

 

|

 

 

ˆ

 

ˆ

 

|

 

|

 

|

 

 

|

 

|

 

|

 

|

 

v

 

 

|

 

|

 

/ \

 

|

---------

 

 

 

/ \

 

|

/

\

 

|

\

1.3

/

/

\

 

|

/

\

 

---------

 

\

/

/

\---------

 

 

/1.2.1.1\

 

 

 

\

/

/1.2.2.1\

 

 

---------

 

 

 

 

\ /

 

---------

 

 

 

 

ˆ

 

 

 

|

 

 

ˆ

 

 

 

|

 

 

 

|

 

 

|

 

 

 

|

 

 

 

v

 

 

|

 

 

 

|

 

 

---------

 

 

 

|

 

 

 

|

 

 

\

1.2

/

 

|

 

 

 

--------------------------

 

 

 

\

/---------

 

 

 

 

 

 

 

 

 

\

/

 

 

 

 

 

 

 

 

 

\ /

 

 

 

 

 

 

 

 

 

 

|

 

 

 

 

 

 

 

 

 

 

|

 

 

 

 

 

 

 

 

 

 

v

 

 

 

 

 

 

 

 

 

---------

 

 

 

 

 

 

 

 

\

1.1

/

 

 

 

 

 

 

 

 

 

\

/

 

 

 

 

 

 

 

 

 

\

/

 

 

 

 

 

 

 

 

 

\ /

 

 

 

 

 

resolver 1183

IDENTIFICATION

Author: Walter F. Tichy, Purdue University, West Lafayette, IN, 47907. Manual Page Revision: 5.6; Release Date: 1995/ 06/05. Copyright 1982, 1988, 1989, Walter F. Tichy. Copyright 1990, 1991, 1992, 1993, 1994, 1995, Paul Eggert.

SEE ALSO

rcsintro(1), ci(1), co(1), ident(1), rcs(1), rcsclean(1), rcsdiff(1), rcsmerge(1), rlog(1), Walter F. Tichy, RCS, “A System for Version Control,” Software—Practice & Experience, 15, 7 (July 1985), 637-654.

GNU, 5 June 1995

resolver

resolver—Resolver configuration file.

SYNOPSIS

/etc/resolv.conf

DESCRIPTION

The resolver is a set of routines in the C library (resolv(3)) that provides access to the Internet Domain Name System. The resolver configuration file contains information that is read by the resolver routines the first time they are invoked by a process. The file is designed to be human readable and contains a list of keywords with values that provide various types of resolver information.

On a normally configured system, this file should not be necessary. The only nameserver to be queried will be on the local machine, the domain name is determined from the host name, and the domain search path is constructed from the domain name.

The different configuration options are

nameserver

Internet address (in dot notation) of a nameserver that the resolver should query. Up to

 

MAXNS (currently 3) nameservers may be listed, one per keyword. If there are multiple servers,

 

the resolver library queries them in the order listed. If no nameserver entries are present, the

 

default is to use the nameserver on the local machine. (The algorithm used is to try a

 

nameserver, and if the query times out, try the next until you run out of nameservers, and

 

then repeat trying all the nameservers until a maximum number of retries are made.)

domain

Local domain name. Most queries for names within this domain can use short names

 

relative to the local domain. If no domain entry is present, the domain is determined from

 

the local hostname returned by gethostname(2); the domain part is taken to be everything

 

after the first .. Finally, if the hostname does not contain a domain part, the root domain is

 

assumed.

search

Search list for hostname lookup. The search list is normally determined from the local

 

domain name; by default, it contains only the local domain name. This may be changed by

 

listing the desired domain search path following the search keyword with spaces or tabs

 

separating the names. Most resolver queries will be attempted using each component of the

 

search path in turn until a match is found. Note that this process may be slow and will

 

generate a lot of network traffic if the servers for the listed domains are not local and that

 

queries will time out if no server is available for one of the domains.

 

The search list is currently limited to six domains with a total of 256 characters.

sortlist

sortlist allows addresses returned by gethostbyname to be sorted. A sort list is specified by

 

IP address netmask pairs. The netmask is optional and defaults to the natural netmask of

 

the net. The IP address and optional network pairs are separated by slashes. Up to 10 pairs

 

may be specified.

 

sortlist 130.155.160.0/255.255.240.0 130.155.0.0

 

Part V: File Formats

1184

 

 

 

options options allows certain internal resolver variables to be modified. The syntax is

options option ...

where option is one of the following:

debug sets RESDEBUG in res.options.

ndots:n sets a threshold for the number of dots that must appear in a name given to res_query (see resolver(3)) before an initial absolute query will be made. The default for n is 1, meaning that if there are any dots in a name, the name will be tried first as an absolute name before any search list elements are appended to it.

The domain and search keywords are mutually exclusive. If more than one instance of these keywords is present, the last instance wins.

The search keyword of a system’s resolv.conf file can be overridden on a per-process basis by setting the environment variable LOCALDOMAIN to a space-separated list of search domains.

The options keyword of a system’s resolv.conf file can be amended on a per-process basis by setting the environment variable RES_OPTIONS to a space-separated list of resolver options as explained previously.

The keyword and value must appear on a single line, and the keyword (such as nameserver) must start the line. The value follows the keyword, separated by whitespace.

FILES

/etc/resolv.conf

SEE ALSO

gethostbyname(3), resolver(3), hostname(7), named(8), Name Server Operations Guide for BIND

11 November 1993

securetty

securetty—File that lists ttys from which root can log in.

DESCRIPTION

/etc/securetty is used by login(1); the file contains the device names of tty lines (one per line, without leading /dev/) on which root is allowed to log in.

FILES

/etc/securetty

SEE ALSO

login(1)

Linux, 29 December 1992

services

services—Internet network services list.

DESCRIPTION

services is a plain ASCII file providing a mapping between friendly textual names for Internet services and their underlying assigned port numbers and protocol types. Every networking program should look into this file to get the port number (and

service-name

services 1185

protocol) for its service. The C library routines getservent(3), getservbyname(3), getservbyport(3), setservent(3), and endservent(3) support querying this file from programs.

Port numbers are assigned by the IANA (Internet Assigned Numbers Authority), and their current policy is to assign both TCP and UDP protocols when assigning a port number. Therefore, most entries will have two entries, even for TCP-only services.

Port numbers below 1024 (so-called low-numbered ports) can only be bound to by root (see bind(2), tcp(7), and udp(7).) This is so that clients connecting to low-numbered ports can trust that the service running on the port is the standard implementation and not a rogue service run by a user of the machine. Well-known port numbers specified by the IANA are normally located in this root-only space.

The presence of an entry for a service in the services file does not necessarily mean that the service is currently running on the machine. See inetd.conf(5) for the configuration of Internet services offered. Note that not all networking services are started by inetd(8) and so won’t appear in inetd.conf(5). In particular, news (NNTP) and mail (SMTP) servers are often initialized from the system boot scripts.

The location of the services file is defined by PATH SERVICES in /usr/include/netdb.h. This is usually set to /etc/services.

Each line describes one service and is of the form:

service-name port/protocol [aliases ...]

service-name

The friendly name the service is known by and looked up under. It is case sensitive. Often, the client program is named after the .

port

The port number (in decimal) to use for this service.

protocol

The type of protocol to be used. This field should match an entry in the protocols(5) file.

 

Typical values include tcp and udp.

aliases

An optional spaceor tab-separated list of other names for this service (see the Bugs section

 

below). Again, the names are case sensitive.

Either spaces or tabs may be used to separate the fields.

Comments are started by the hash sign (#) and continue until the end of the line. Blank lines are skipped.

The service-name should begin in the first column of the file because leading spaces are not stripped. service-names can be any printable characters excluding space and tab; however, a conservative choice of characters should be used to minimize inter-operability problems. For example, a–z, 0–9, and hyphen (–) would seem a sensible choice.

Lines not matching this format should not be present in the file. (Currently, they are silently skipped by getservent(3), getservbyname(3), and getservbyport(3). However, this behavior should not be relied on.)

As a backwards compatibility feature, the slash (/) between the port number and protocol name can in fact be either a slash or a comma (,). Use of the comma in modern installations is depreciated.

This file might be distributed over a network using a network-wide naming service such as Yellow Pages/NIS or BIND/ Hesiod.

A sample services file might look like this:

netstat

15/tcp

 

qotd

17/tcp

quote

msp

18/tcp

# message send protocol

msp

18/udp

# message send protocol

chargen

19/tcp

ttytst source

chargen

19/udp

ttytst source

ftp

21/tcp

 

#

22 - unassigned

telnet

23/tcp

 

 

Part V: File Formats

1186

 

 

 

BUGS

There is a maximum of 35 aliases, due to the way the getservent(3) code is written.

Lines longer than BUFSIZ (currently 1024) characters will be ignored by getservent(3), getservbyname(3), and getservbyport(3). However, this will also cause the next line to be misparsed.

FILES

/etc/services

The Internet network services list

/usr/include/netdb.h

Definition of _PATH_SERVICES

SEE ALSO

getservent(3), getservbyname(3), getservbyport(3), setservent(3), endservent(3), protocols(5), listen(2), inetd.conf(5), inetd(8), Assigned Numbers RFC, most recently RFC 1700 (AKA STD0002), Guide to Yellow Pages Service, Guide to BIND/Hesiod Service.

Linux, 11 January 1996

shells

shells—Pathnames of valid login shells.

DESCRIPTION

/etc/shells is a text file that contains the full pathnames of valid login shells. This file is consulted by chsh(1) and is available to be queried by other programs.

EXAMPLES

/etc/shells may contain the following paths:

/bin/sh

/bin/csh

FILES

/etc/shells

SEE ALSO

chsh(1)

21 November 1993

syslog.conf

syslog.confsyslogd(8) configuration file.

DESCRIPTION

The syslog.conf file is the configuration file for the syslogd(8) program. It consists of lines with two fields: the selector field, which specifies the types of messages and priorities to which the line applies, and an action field, which specifies the action to be taken if a message syslogd received matches the selection criteria. There cannot be any spaces in the action field. The selector field is separated from the action field by one or more tab or space characters. (This is a departure from the standard BSD way of doing things; both tabs and spaces can be used to separate the selector from the action.)

The selector functions are encoded as a facility, a period (.), and a level, with no intervening whitespace. Both the facility and the level are case insensitive.

syslog.conf 1187

The facility describes the part of the system generating the message and is one of the following keywords: auth, authpriv, cron, daemon, kern, lpr, mail, mark, news, syslog, user, uucp, and local0 through local7. These keywords (with the exception of mark) correspond to the similar Dv LOG_ values specified to the openlog(3) and syslog(3) library routines.

The level describes the severity of the message and is a keyword, optionally preceded by an equals (=), from the following ordered list (higher to lower): emerg, alert, crit, err, warning, notice, info, and debug. These keywords correspond to the similar Dv LOG_ values specified to the syslog library routine.

See syslog(3) for further descriptions of both the facility and level keywords and their significance.

If a received message matches the specified facility and is of the specified level (or a higher level if level was specified without =), the action specified in the action field will be taken.

Multiple selectors may be specified for a single action by separating them with semicolon (;) characters. It is important to note, however, that each selector can modify the ones preceding it.

Multiple facilities may be specified for a single level by separating them with comma (,) characters.

An asterisk (*) can be used to specify all facilities or all levels.

The special facility “mark” receives a message at priority “info” every 20 minutes (see syslogd(8)). This is not enabled by a facility field containing an asterisk.

The special level “none” disables a particular facility.

The action field of each line specifies the action to be taken when the selector field selects a message. There are four forms:

A pathname (beginning with a leading slash). Selected messages are appended to the file.

A hostname (preceded by an at (@) sign). Selected messages are forwarded to the syslogd program on the named host.

A comma-separated list of users. Selected messages are written to those users if they are logged in.

An asterisk. Selected messages are written to all logged-in users.

Blank lines and lines whose first non-blank character is a hash (#) character are ignored.

EXAMPLES

A configuration file might appear as follows:

#Log all kernel messages, authentication messages of

#level notice or higher and anything of level err or

#higher to the console.

#Don’t log private authentication messages!

*.err;kern.*;auth.notice;authpriv.none

/dev/console

#Log anything (except mail) of level info or higher.

#Don’t log private authentication messages!

*.info;mail.none;authpriv.none

/var/log/messages

# Log debug messages only

 

*.=debug

/var/log/debug

# The authpriv file has restricted access.

 

authpriv.*

/var/log/secure

# Log all the mail messages in one place.

 

mail.*

/var/log/maillog

#Everybody gets emergency messages, plus log them on another

#machine.

*.emerg

*

*.emerg

@arpa.berkeley.edu

 

Part V: File Formats

1188

 

 

 

# Root and Eric get alert and higher messages.

 

*.alert

root,eric

#Save mail and news errors of level err and higher in a

#special file.

uucp,news.crit

/var/log/spoolerr

FILES

/etc/syslog.conf

The syslogd(8) configuration file.

BUGS

The effects of multiple selectors are sometimes not intuitive. For example mail.crit,*.err will select mail facility messages at the level of err or higher, not at the level of crit or higher.

SEE ALSO

syslog(3), syslogd(8)

10 May 1991

termcap

termcap—Terminal capability database.

DESCRIPTION

The termcap database is an obsolete facility for describing the capabilities of character-cell terminals and printers. It is retained only for capability with old programs; new ones should use the terminfo(5) database and associated libraries.

/etc/termcap is an ASCII file (the database master) that lists the capabilities of many different types of terminals. Programs can read termcap to find the particular escape codes needed to control the visual attributes of the terminal actually in use. (Other aspects of the terminal are handled by stty.) The termcap database is indexed on the TERM environment variable.

termcap entries must be defined on a single logical line, with \ used to suppress the newline. Fields are separated by :. The first field of each entry starts at the left-hand margin and contains a list of names for the terminal, separated by |.

The first subfield may (in BSD termcap entries from versions 4.3 and prior) contain a short name consisting of two characters. This short name may consist of capital or small letters. In 4.4 BSD termcap entries, this field is omitted.

The second subfield (first in the newer 4.4 BSD format) contains the name used by the environment variable TERM. It should be spelled in lowercase letters. Selectable hardware capabilities should be marked by appending a hyphen and a suffix to this name. Usual suffixes are w (more than 80 characters wide), am (automatic margins), nam (no automatic margins) and rv (reverse video display). The third subfield contains a long and descriptive name for this termcap entry.

Subsequent fields contain the terminal capabilities; any continued capability lines must be indented one tab from the left margin.

Although there is no defined order, it is suggested to write first Boolean, then numeric, and at last string capabilities, each sorted alphabetically without looking at lower or upper spelling. Capabilities of similar functions can be written in one line.

Example:

Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\

Head line: Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\

Boolean: :bs:\

Numeric: :co#80:\

String: :sr=nE[H:\

 

termcap

 

 

 

1189

 

 

Boolean Capabilities

 

 

 

 

 

 

 

 

 

 

5i

Printer will not echo on screen

 

 

am

Automatic margins which means automatic line wrap

 

 

bs

Ctrl+H (8 dec.) performs a backspace

 

 

bw

Backspace on left margin wraps to previous line and right margin

 

 

da

Display retained above screen

 

 

db

Display retained below screen

 

 

eo

A space erases all characters at cursor position

 

 

es

Escape sequences and special characters work in status line

 

 

gn

Generic device

 

 

hc

This is a hardcopy terminal

 

 

HC

The cursor is hard to see when not on bottom line

 

 

hs

Has a status line

 

 

hz

Hazeltine bug; the terminal cannot print tilde characters

 

 

in

Terminal inserts nulls, not spaces, to fill whitespace

 

 

km

Terminal has a meta key

 

 

mi

Cursor movement works in insert mode

 

 

ms

Cursor movement works in standout/underline mode

 

 

NP

No pad character

 

 

NR

ti does not reverse te

 

 

nx

No padding; must use XON/XOFF

 

 

os

Terminal can overstrike

 

 

ul

Terminal underlines, although it cannot overstrike

 

 

xb

Beehive glitch; F1 sends Escape and F2 sends ˆC

 

 

xn

Newline/wraparound glitch

 

 

xo

Terminal uses XON/XOFF protocol

 

 

xs

Text typed over standout text will be displayed in standout

 

 

xt

Teleray glitch; destructive tabs and odd standout mode

 

 

 

 

 

 

Numeric Capabilities

 

 

 

 

 

 

 

co

Number of columns

 

 

dB

Delay in milliseconds for backspace on hardcopy terminals

 

 

dC

Delay in milliseconds for carriage return on hardcopy terminals

 

 

dF

Delay in milliseconds for form feed on hardcopy terminals

 

 

dN

Delay in milliseconds for newline on hardcopy terminals

 

 

dT

Delay in milliseconds for tabulator stop on hardcopy terminals

 

 

dV

Delay in milliseconds for vertical tabulator stop on hardcopy terminals

 

 

it

Difference between tab positions

 

 

lh

Height of soft labels

 

 

lm

Lines of memory

 

 

lw

Width of soft labels

 

 

continues

 

Part V: File Formats

1190

 

 

 

Numeric Capabilities

li

Number of lines

Nl

Number of soft labels

pb

Lowest baud rate that needs padding

sg

Standout glitch

ug

Underline glitch

vt

Virtual terminal number

ws

Width of status line if different from screen width

 

 

String Capabilities

 

 

 

!1

Shifted save key

!2

Shifted suspend key

!3

Shifted undo key

#1

Shifted help key

#2

Shifted home key

#3

Shifted input key

#4

Shifted cursor left key

%0

Redo key

%1

Help key

%2

Mark key

%3

Message key

%4

Move key

%5

Next-object key

%6

Open key

%7

Options key

%8

Previous-object key

%9

Print key

%a

Shifted message key

%b

Shifted move key

%c

Shifted next key

%d

Shifted options key

%e

Shifted previous key

%f

Shifted print key

%g

Shifted redo key

%h

Shifted replace key

%i

Shifted cursor right key

%j

Shifted resume key

&0

Shifted cancel key

&1

Reference key

&2

Refresh key

&3

Replace key

&4

Restart key

termcap 1191

String Capabilities

&5

Resume key

&6

Save key

&7

Suspend key

&8

Undo key

&9

Shifted begin key

*0

Shifted find key

*1

Shifted command key

*2

Shifted copy key

*3

Shifted create key

*4

Shifted delete character

*5

Shifted delete line

*6

Select key

*7

Shifted end key

*8

Shifted clear line key

*9

Shifted exit key

@0

Find key

@1

Begin key

@2

Cancel key

@3

Close key

@4

Command key

@5

Copy key

@6

Create key

@7

End key

@8

Enter/send key

@9

Exit key

al

Insert one line

AL

Insert %1 lines

ac

Pairs of block graphic characters to map alternate character set

ae

End alternative character set

as

Start alternative character set for block graphic characters

bc

Backspace if not ˆH

bl

Audio bell

bt

Move to previous tab stop

cb

Clear from beginning of line to cursor

cc

Dummy command character

cd

Clear to end of screen

ce

Clear to end of line

ch

Move cursor horizontally only to column %1

cl

Clear screen and cursor home

cm

Cursor move to row %1 and column %2 (on screen)

CM

Move cursor to row %1 and column %2 (in memory)

continues

 

Part V: File Formats

1192

 

 

 

String Capabilities

cr

Carriage return

cs

Scroll region from line %1 to %2

ct

Clear tabs

cv

Move cursor vertically only to line %1

dc

Delete one character

DC

Delete %1 characters

dl

Delete one line

DL

Delete %1 lines

dm

Begin delete mode

do

Cursor down one line

DO

Cursor down #1 lines

ds

Disable status line

eA

Enable alternate character set

ec

Erase %1 characters starting at cursor

ed

End delete mode

ei

End insert mode

ff

Formfeed character on hardcopy terminals

fs

Return character to its position before going to status line

F1

The string sent by function key f11

F2

The string sent by function key f12

F3

The string sent by function key f13

F9

The string sent by function key f19

FA

The string sent by function key f20

FB

The string sent by function key f21

FZ

The string sent by function key f45

Fa

The string sent by function key f46

Fb

The string sent by function key f47

Fr

The string sent by function key f63

hd

Move cursor a half line down

ho

Cursor home

hu

Move cursor a half line up

i1

Initialization string 1 at login

i3

Initialization string 3 at login

is

Initialization string 2 at login

ic

Insert one character

IC

Insert %1 characters

if

Initialization file

im

Begin insert mode

termcap 1193

String Capabilities

ip

Insert pad time and needed special characters after insert

iP

Initialization program

K1

Upper-left key on keypad

K2

Center key on keypad

K3

Upper-right key on keypad

K4

Bottom-left key on keypad

K5

Bottom-right key on keypad

k0

Function key 0

k1

Function key 1

k2

Function key 2

k3

Function key 3

k4

Function key 4

k5

Function key 5

k6

Function key 6

k7

Function key 7

k8

Function key 8

k9

Function key 9

k;

Function key 10

ka

Clear all tabs key

kA

Insert line key

kb

Backspace key

kB

Back tab stop

kC

Clear screen key

kd

Cursor down key

kD

Key for delete character under cursor

ke

Turn keypad off

kE

Key for clear to end of line

kF

Key for scrolling forward/down

kh

Cursor home key

kH

Cursor down key

kI

Insert character/insert mode key

kl

Cursor left key

kL

Key for delete line

kM

Key for exit insert mode

kN

Key for next page

kP

Key for previous page

kr

Cursor right key

kR

Key for scrolling backward/up

ks

Turn keypad on

kS

Clear to end of screen key

kt

Clear this tab key

continues

 

Part V: File Formats

1194

 

 

 

String Capabilities

kT

Set tab here key

ku

Cursor up key

l0

Label of zeroth function key, if not f0

l1

Label of first function key, if not f1

l2

Label of first function key, if not f2

la

Label of tenth function key, if not f10

le

Cursor left one character

ll

Move cursor to lower-left corner

LE

Cursor left %1 characters

LF

Turn soft labels off

LO

Turn soft labels on

mb

Start blinking

MC

Clear soft margins

md

Start bold mode

me

End all modes such as so, us, mb, md, and mr

mh

Start half bright mode

mk

Dark mode (Characters invisible)

ML

Set left soft margin

mm

Put terminal in meta mode

mo

Put terminal out of meta mode

mp

Turn on protected attribute

mr

Start reverse mode

MR

Set right soft margin

nd

Cursor right one character

nw

Carriage return command

pc

Padding character

pf

Turn printer off

pk

Program key %1 to send string %2 as if typed by user

pl

Program key %1 to execute string %2 in local mode

pn

Program soft label %1 to show string %2

po

Turn the printer on

pO

Turn the printer on for %1 (<256) bytes

ps

Print screen contents on printer

px

Program key %1 to send string %2 to computer

r1

Reset string 1 to set terminal to sane modes

r2

Reset string 2 to set terminal to sane modes

r3

Reset string 3 to set terminal to sane modes

RA

Disable automatic margins

rc

Restore saved cursor position

rf

Reset string file name

termcap 1195

String Capabilities

RF

Request for input from terminal

RI

Cursor right %1 characters

rp

Repeat character %1 for %2 times

rP

Padding after character sent in replace mode

rs

Reset string

RX

Turn off XON/XOFF flow control

sa

Set %1 %2 %3 %4 %5 %6%7 %8 %9 attributes

SA

Enable automatic margins

sc

Save cursor position

se

End standout mode

sf

Normal scroll one line

SF

Normal scroll %1 lines

so

Start standout mode

sr

Reverse scroll

SR

Scroll back %1 lines

st

Set tabulator stop in all rows at current column

SX

Turn on XON/XOFF flow control

ta

Move to next hardware tab

tc

Read in terminal description from another entry

te

End program that uses cursor motion

ti

Begin program that uses cursor motion

ts

Move cursor to column %1 of status line

uc

Underline character under cursor and move cursor right

ue

End underlining

up

Cursor up one line

UP

Cursor up %1 lines

us

Start underlining

vb

Visible bell

ve

Normal cursor visible

vi

Cursor invisible

vs

Standout cursor

wi

Set window from line %1 to %2 and column %3 to %4

XF

XOFF character if not ˆS

There are several ways of defining the control codes for string capabilities:

Normal characters except ˆ, \, and % represent themselves.

A ˆx means Ctrl+x. Ctrl+A equals 1 decimal. \x means a special code. x can be one of the following characters:

E

Escape (27).

n

Linefeed (10).

r

Carriage return (13).

t

Tabulation (9).

 

Part V: File Formats

1196

 

 

 

b

Backspace (8).

f

Form feed (12).

0

Null character. A \xxx specifies the octal character xxx.

i

Increments parameters by one.

r

Single parameter capability.

+

Add value of next character to this parameter and do binary output.

2

Do ASCII output of this parameter with a field width of 2.

d

Do ASCII output of this parameter with a field width of 3.

%

Print a %

If you use binary output, then you should avoid the null character because it terminates the string. You should reset tabulator expansion if a tabulator can be the binary output of a parameter.

Warning: The preceding metacharacters for parameters may be wrong; they document Minix termcap, which may not be compatible with Linux termcap.

The block graphic characters can be specified by three string capabilities:

as

Start the alternative charset.

ae

End it.

ac

Pairs of characters. The first character is the name of the block graphic symbol and

 

the second character is its definition.

The following names are available:

 

+

Right arrow (>)

,

Left arrow (<)

.

Down arrow (v)

0

Full square (#)

I

Latern (#)

-

Upper arrow (ˆ)

Rhombus (+)

a

Chess board (:)

f

Degree ()

g

Plus-minus (#)

h

Square (#)

j

Right bottom corner (+)

k

Right upper corner (+)

l

Left upper corner (+)

m

Left bottom corner (+)

n

Cross (+)

o

Upper horizontal line (-)

q

Middle horizontal line (-)

s

Bottom horizontal line (_)

t

Left tee (+)

u

Right tee (+)

v

Bottom tee (+)

w

Normal tee (+)

x

Vertical line (_)

˜

Paragraph (???)

tzfile 1197

The values in parentheses are suggested defaults that are used by curses if the capabilities are missing.

SEE ALSO

termcap(3), curses(3), terminfo(5)

Linux

ttytype

ttytype—Terminal name and device list.

DESCRIPTION

The /etc/ttytype file associates termcap/terminfo terminal type names with tty lines. Each line consists of a terminal type, followed by whitespace, followed by a tty name (a device name without the /dev/ prefix).

This association is used by the program tset(1) to set the environment variable TERM to the default terminal name for the user’s current tty.

This facility was designed for a traditional time-sharing environment featuring character-cell terminals hardwired to a UNIX minicomputer. It is little used on modern workstation and personal UNIXes.

EXAMPLE

A typical /etc/ttytype is

con80x25 tty1 vt320 ttys0

FILES

/etc/ttytype

The tty definitions file

SEE ALSO

getty(1), terminfo(5), termcap(5)

Linux, 24 July 1993

tzfile

tzfile—Time zone information.

SYNOPSIS

#include <tzfile.h>

DESCRIPTION

The time zone information files used by tzset(3) begin with bytes reserved for future use, followed by six four-byte values of type long, written in a “standard” byte order (the high-order byte of the value is written first). These values are, in order

tzh_ttisgmtcnt tzh_ttisstdcnt tzh_leapcnt tzh_timecnt tzh_typecnt tzh_charcnt

The number of GMT/local indicators stored in the file. The number of standard/wall indicators stored in the file.

The number of leap seconds for which data is stored in the file.

The number of “transition times” for which data is stored in the file.

The number of “local time types” for which data is stored in the file (must not be zero). The number of characters of “time zone abbreviation strings” stored in the file.

 

Part V: File Formats

1198

 

 

 

The preceding header is followed by tzh_timecnt four-byte values of type long, sorted in ascending order. These values are written in “standard” byte order. Each is used as a transition time (as returned by time(2)) at which the rules for computing local time change. Next come tzh_timecnt one-byte values of type unsigned char; each one tells which of the different types of “local time” types described in the file is associated with the same-indexed transition time. These values serve as indices into an array of ttinfo structures that appears next in the file; these structures are defined as follows:

struct ttinfo { long tt_gmtoff; int tt_isdst;

unsigned int tt_abbrind; };

Each structure is written as a four-byte value for tt_gmtoff of type long, in a standard byte order, followed by a one-byte value for tt_isdst and a one-byte value for tt_abbrind. In each structure, tt_gmtoff gives the number of seconds to be added to GMT, tt_isdst tells whether tm_isdst should be set by localtime(3) and tt_abbrind serves as an index into the array of time zone abbreviation characters that follow the ttinfo structures in the file.

Then there are (as returned by the given time.

tzh_leapcnt pairs of four-byte values, written in standard byte order; the first value of each pair gives the time time(2)) at which a leap second occurs; the second gives the total number of leap seconds to be applied after The pairs of values are sorted in ascending order by time.

Then there are tzh_ttisstdcnt standard/wall indicators, each stored as a one-byte value; they tell whether the transition times associated with local time types were specified as standard time or wall clock time and are used when a time zone file is used in handling POSIX-style time zone environment variables.

Finally, there are tzh_ttisgmtcnt GMT/local indicators, each stored as a one-byte value; they tell whether the transition times associated with local time types were specified as GMT or local time and are used when a time zone file is used in handling POSIX-style time zone environment variables.

Localtime uses the first standard-time ttinfo structure in the file (or simply the first ttinfo structure in the absence of a standard-time structure) if either tzh_timecnt is zero or the time argument is less than the first transition time recorded in the file.

SEE ALSO

newctime(3)

utmp, wtmp

utmp, wtmp—Login records.

SYNOPSIS

#include <utmp.h>

DESCRIPTION

The utmp file allows you to discover information about who is currently using the system. There may be more users currently using the system because not all programs use utmp logging.

Warning: utmp must not be writable because many system programs depend on its integrity. You risk faked system log files and modifications of system files if you leave utmp writable to any user.

The file is a sequence of entries with the following structure declared in the include file:

#define UT_UNKNOWN 0 #define RUN_LVL 1 #define BOOT_TIME 2 #define NEW_TIME 3 #define OLD_TIME 4

utmp, wtmp

1199

 

#define INIT_PROCESS 5 #define LOGIN_PROCESS 6 #define USER_PROCESS 7 #define DEAD_PROCESS 8

#define UT_LINESIZE 12 #define UT_NAMESIZE 8 #define UT_HOSTSIZE 16

struct utmp { short ut_type; pid_t ut_pid;

char ut_line[UT_LINESIZE]; char ut_id[2];

time_t ut_time;

char ut_user[UT_NAMESIZE]; char ut_host[UT_HOSTSIZE]; long ut_addr;

};

/* type of login */ /* pid of process */

/* device name of tty – “/dev/” */ /* init id or abbrev. ttyname */ /* login time */

/* user name */

/* host name for remote login */ /* IP addr of remote host */

This structure gives the name of the special file associated with the user’s terminal, the user’s login name, and the time of login in the form of time(2). String fields are terminated by \0 if they are shorter than the size of the field.

The first entries ever created result from init(8) processing inittab(5). Before an entry is processed, though, init(8) cleans up utmp by setting ut_type to DEAD_PROCESS, clearing ut_user, ut_host and ut_time with null bytes for each record that ut_type is not DEAD_PROCESS or RUN_LVL and where no process with PID ut_pid exists. If no empty record with the needed ut_id can be found, init creates a new one. It sets ut_id from the inittab, ut_pid and ut_time to the current values, and ut_type to

INIT_PROCESS.

getty(8) locates the entry by the PID, changes ut_type to LOGIN_PROCESS, changes ut_time, sets ut_line and waits for connection to be established. login(8), after a user has been authenticated, changes ut_type to USER_PROCESS, changes ut_time, and sets ut_host and ut_addr. Depending on getty(8) and login(8), records may be located by ut_line instead of the preferable ut_pid.

When init(8) finds that a process has exited, it locates its utmp entry by ut_pid, sets ut_type to DEAD_PROCESS, and clears ut_user, ut_host, and ut_time with null bytes.

xterm(1) and other terminal emulators directly create a USER_PROCESS record and generate the ut_id by using the last two letters of /dev/ttyp%c or by using p%d for /dev/pts/%d.

If they find a DEAD_PROCESS for this ID, they recycle it; otherwise, they create a new entry. If they can, they will mark it as DEAD_PROCESS on exiting and it is advised that they null ut_line, ut_time, ut_user, and ut_host as well.

xdm(8) should not create an utmp record because there is no assigned terminal. Letting it create one will result in trouble such as finger: cannot stat /dev/machine.dom. It should create wtmp entries, though, just like ftpd(8) does.

telnetd(8) sets up a LOGIN_PROCESS entry and leaves the rest to login(8) as usual. After the Telnet session ends, telnetd(8) cleans up utmp in the described way.

The wtmp file records all logins and logouts. Its format is exactly like utmp except that a null username indicates a logout on the associated terminal. Furthermore, the terminal name ~ with username shutdown or reboot indicates a system shutdown or reboot and the pair of terminal names “|”/”}” logs the old/new system time when date(1) changes it. wtmp is maintained by login(1) and init(1) and some variation of getty(1). Neither of these programs creates the file, so if it is removed, recordkeeping is turned off.

FILES

/var/run/utmp

/var/log/wtmp

 

Part V: File Formats

1200

 

 

 

CONFORMING TO

Linux utmp entries conform neither to v7/BSD nor to SYSV: They are a mix of the two. v7/BSD has fewer fields; most importantly, it lacks ut_type, which causes native v7/BSD-like programs to display (for example) dead or login entries. Further there is no configuration file that allocates slots to sessions. BSD does so because it lacks ut_id fields. In Linux (as in SYSV), the ut_id field of a record will never change once it is set, which reserves that slot without needing a configuration file. Clearing ut_id may result in race conditions leading to corrupted utmp entries and potential security holes. Clearing the previously mentioned fields by filling them with null bytes is not required by SYSV semantics, but it allows you to run many programs that assume BSD semantics and that do not modify utmp. Linux uses the BSD conventions for line contents. SYSV only uses the type field to mark them and logs informative messages such as new time in the line field. SYSV has one more field to log the exit status of dead processes. UT_UNKNOWN seems to be a Linux invention. There is no type ACCOUNTING in Linux. SYSV has no ut_host or ut_addr fields. Unlike various other systems, where utmp logging can be disabled by removing the file, utmp must always exist on Linux. If you want to disable who(1), then do not make utmp world readable.

RESTRICTIONS

The file format is machine dependent, so it is recommended that it be processed only on the machine architecture where it got created.

SEE ALSO

ac(1), date(1), last(1), login(1), who(1), getutent(3), init(8)

20 July 1996

uuencode

uuencode—Format of an encoded uuencode file.

DESCRIPTION

Files output by uuencode(1) consist of a header line, followed by a number of body lines, and a trailer line. The uudecode(1) command will ignore any lines preceding the header or following the trailer. Lines preceding a header must not, of course, look like a header.

The header line is distinguished by having the first six characters begin. The word begin is followed by a mode (in octal) and a string that names the remote file. A space separates the three items in the header line.

The body consists of a number of lines, each at most 62 characters long (including the trailing newline). These consist of a character count, followed by encoded characters, followed by a newline. The character count is a single printing character and represents an integer, the number of bytes the rest of the line represents. Such integers are always in the range from 0 to 63 and can be determined by subtracting the character space (octal 40) from the character.

Groups of three bytes are stored in four characters, six bits per character. All are offset by a space to make the characters print. The last line may be shorter than the normal 45 bytes. If the size is not a multiple of three, this fact can be determined by the value of the count on the last line. Extra garbage will be included to make the character count a multiple of four. The body is terminated by a line with a count of zero. This line consists of one ASCII space.

The trailer line consists of end on a line by itself.

SEE ALSO

uuencode(1), uudecode(1), uusend(1), uucp(1), mail(1)

HISTORY

The uuencode file format appeared in BSD 4.0.

XF86Config 1201

XF86Config

XF86Config—Configuration file for XFree86.

DESCRIPTION

XFree86 uses a configuration file called XF86Config for its initial setup. This configuration file is searched for in the following places:

/etc/XF86Config <XRoot>/lib/X11/XF86Config.hostname <XRoot>/lib/X11/XF86Config

<XRoot> refers to the root of the X11 install tree.

This file is composed of a number of sections. Each section has the form:

Section “SectionName

SectionEntry ...

EndSection

The section names are

 

Files

File pathnames

ServerFlags

Server flags

Keyboard

Keyboard configuration

Pointer

Pointer configuration

Monitor

Monitor description

Device

Graphics device description

Screen

Screen configuration

The Files section is used to specify the default font path and the path to the RGB database. These paths can also be set from the command line (see Xserver(1)). The entries available for this section are

FontPath “path

Sets the search path for fonts. This path is a comma-separated list of directories that the X

 

server searches for font databases. Multiple FontPath entries may be specified, and they will

 

be concatenated to build up the fontpath used by the server.

 

X11R6 allows the X server to request fonts from a font server. A font server is specified by

 

placing a “<trans>/<hostname>:<port_number>” entry into the fontpath. For example, the

 

fontpath

 

“/usr/X11R6/lib/X11/fonts/misc/,tcp/zok:7100”

 

tells the X server to first try to locate the font in the local directory /usr/X11R6/lib/X11/

 

fonts/misc. If that fails, then request the font from the font server running on machine zok

 

listening for connections on TCP port number 7100.

RGBPath “path

Sets the path name for the RGB color database.

The ServerFlags section is used to specify some miscellaneous X server options. The entries available for this section are

NoTrapSignals

This prevents the X server from trapping a range of unexpected fatal signals and exiting

 

cleanly. Instead, the X server will die and drop core where the fault occurred. The default

 

behavior is for the X server exit cleanly but still drop a core file. In general, you never want

 

to use this option unless you are debugging an X server problem.

DontZap

This disallows the use of the Ctrl+Alt+Backspace sequence. This sequence allows you to

 

terminate the X server. Setting DontZap allows this key sequence to be passed to clients.

DontZoom

This disallows the use of the Ctrl+Alt+Keypad-Plus and Ctrl+Alt+Keypad-Minus sequences.

 

These sequences allow you to switch between video modes. Setting DontZoom allows these

 

key sequences to be passed to clients.

 

Part V: File Formats

1202

 

 

 

The Keyboard section is used to specify the keyboard input device, parameters, and some default keyboard mapping options. The entries available for this section are

Protocol kbd-protocol kbd-protocol may be either Standard or Xqueue. Xqueue is specified when using the event queue driver on SVR3 or SVR4.

AutoRepeat delay rate

Changes the behavior of the autorepeat of the keyboard. This does not work on all platforms.

ServerNumLock

Forces the X server to handle the numlock key internally. The X server sends a different set

 

of keycodes for the numpad when the numlock key is active. This enables applications to

 

make use of the numpad.

LeftAlt mapping RightAlt mapping AltGr mapping

ScrollLock mapping RightCtl mapping

Allows a default mapping to be set for the preceding keys (note that AltGr is a synonym for RightAlt). The values that may be specified for mapping are

Meta

Compose

ModeShift

ModeLock

ScrollLock

Control

The default mapping when none of these options are specified is

LeftAlt Meta

 

RightAlt Meta

 

ScrollLock Compose

 

RightCtl Control

 

XLeds led ...

Makes led available for clients instead of using the traditional function (Scroll Lock, Caps

 

Lock, and Num Lock). led is a list of numbers in the range 1 to 3.

VTSysReq

Enables the SYSV-style VT switch sequence for non-SYSV systems that support VT

 

switching. This sequence is Alt-SysRq followed by a function key (Fn). This prevents the X

 

server trapping the keys used for the default VT switch sequence.

VTInit “command

Runs command after the VT used by the server has been opened. The command string is

 

passed to /bin/sh -c and is run with the real user’s ID with stdin and stdout set to the VT.

 

The purpose of this option is to allow system-dependent VT initialization commands to be

 

run. One example is a command to disable the two-key VT switching sequence that is the

 

default on some systems.

The Pointer section is used to specify the pointer device and parameters. The entries available for this section are

Protocol protocol-type Specifies the pointer device protocol type. The protocol types available are

BusMouse

Logitech

Microsoft

MMSeries

Mouseman

MouseSystems

PS/2

XF86Config 1203

MMHitTab

Xqueue

OSMouse

One should specify BusMouse for the Logitech bus mouse. Also, many newer Logitech serial mice use either the Microsoft or MouseMan protocol. Xqueue should be specified here if it was used in the Keyboard section. OSMouse refers to the event-driver mouse interface available on SCO’s SVR3. This may optionally be followed by a number specifying the number of buttons the mouse has.

Device pointer-dev

Specifies the device the server should open for pointer input (such as /dev/tty00

 

or /dev/mouse). A device should not be specified when using the Xqueue or

 

OSMouse protocols.

BaudRate rate

Sets the baud rate of the serial mouse to rate. For mice that allow dynamic speed

 

adjustments (such as Logitech), the baud rate is changed in the mouse.

 

Otherwise, the rate is simply set on the computer’s side to allow mice with non-

 

standard rates (the standard rate is 1200).

Emulate3Buttons

Enables the emulation of the third mouse button for mice that only have two

 

physical buttons. The third button is emulated by pressing both buttons

 

simultaneously.

Emulate3Timeout timeout

ChordMiddle

Sets the time (in milliseconds) that the server waits before deciding if two buttons were pressed “simultaneously” when three-button emulation is enabled. The default time-out is 50ms.

Handles mice that send left+right events when the middle button is used (such as some Logitech Mouseman mice).

SampleRate rate

Sets the number of motion/button-events the mouse sends per second. This is

 

currently only supported for some Logitech mice.

ClearDTR

This option clears the DTR line on the serial port used by the mouse. This

 

option is only valid for a mouse using the MouseSystems protocol. Some dual-

 

protocol mice require DTR to be cleared to operate in MouseSystems mode. Note,

 

in versions of XFree86 prior to 2.1, this option also cleared the RTS line. A

 

separate ClearRTS option has since been added for mice that require this.

ClearRTS

This option clears the RTS line on the serial port used by the mouse. This option

 

is only valid for a mouse using the MouseSystems protocol. Some dual-protocol

 

mice require both DTR and RTS to be cleared to operate in MouseSystems mode.

 

Both the ClearDTR and ClearRTS options should be used for such mice.

The Monitor sections are used to define the specifications of a monitor and a list of video modes suitable for use with a monitor. More than one Monitor section may be present in an XF86Config file. The entries available for this section are

Identifier “ID string

This specifies a string by which the monitor can be referred to in a later Screen

 

section. Each Monitor section should have a unique ID string.

VendorName “vendor

This optional entry specifies the monitor’s manufacturer.

ModelName “model

This optional entry specifies the monitor’s model.

HorizSync horizsync-range

Gives the ranges of horizontal sync frequencies supported by the monitor.

 

horizsync-range may be a comma-separated list of either discrete values or ranges

 

of values. A range of values is two values separated by a dash. By default, the

 

values are in units of kHz. They may be specified in MHz or Hz if MHz or Hz is

 

added to the end of the line. The data given here is used by the X server to

 

determine if video modes are within the specifications of the monitor. This

 

information should be available in the monitor’s handbook.

 

Part V: File Formats

1204

 

 

 

VertRefresh vertrefresh-range

Gives the ranges of vertical refresh frequencies supported by the monitor.

 

vertrefresh-range may be a comma-separated list of either discrete values

 

or ranges of values. A range of values is two values separated by a dash. By

 

default, the values are in units of Hz. They may be specified in MHz or

 

kHz if MHz or kHz is added to the end of the line. The data given here is

 

used by the X server to determine if video modes are within the

 

specifications of the monitor. This information should be available in the

 

monitor’s handbook.

Gamma gamma-values

This is an optional entry that can be used to specify the gamma correction for the monitor. It may be specified as either a single value or as three separate RGB values. Not all X servers are capable of using this information.

Mode “name

Indicates the start of a multi-line video mode description. The mode

 

description is terminated with an End-Mode line. The mode description

 

consists of the following entries:

DotClock clock

The dot clock rate to be used for the mode.

HTimings hdisp hsyncstart hsyncend htotal

Specifies the horizontal timings for the mode.

VTimings vdisp vsyncstart vsyncend vtotal

Specifies the vertical timings for the mode.

Flags “flag” ...

Specifies an optional set of mode flags. Interlace indicates that the mode

 

is interlaced. DoubleScan indicates a mode where each scanline is doubled.

 

+HSync and -HSync can be used to select the polarity of the HSync signal.

 

+VSync and -VSync can be used to select the polarity of the VSync signal.

 

Composite can be used to specify composite sync on hardware where this is

 

supported. Additionally, on some hardware, +CSync and -CSync may be

 

used to select the composite sync polarity.

Modeline “namemode-description

A single line format for specifying video modes. The mode-description is

 

in four sections, the first three of which are mandatory. The first is the

 

pixel clock. This is a single number specifying the pixel clock rate for the

 

mode. The second section is a list of four numbers specifying the

 

horizontal timings. These numbers are the hdisp, hsyncstart, hsyncend,

 

htotal. The third section is a list of four numbers specifying the vertical

 

timings. These numbers are vdisp, vsyncstart, vsyncend, vtotal. The final

 

section is a list of flags specifying other characteristics of the mode.

 

Interlace indicates that the mode is interlaced. DoubleScan indicates a

 

mode where each scanline is doubled. +HSync and –HSync can be used to

 

select the polarity of the HSync signal. +VSync and –VSync can be used to

 

select the polarity of the VSync signal. Composite can be used to specify

 

composite sync on hardware where this is supported. Additionally, on

 

some hardware, +CSync and -CSync may be used to select the composite

 

sync polarity.

The Device sections are used to define a graphics device (video board). More than one Device section may be present in an XF86Config file. The entries available for this section are

Identifier “ID string

This specifies a string by which the graphics device can be referred to in a

 

later Screen section. Each Device section should have a unique ID string.

VendorName “vendor

BoardName “model

Chipset chipset-type

This optional entry specifies the graphics device’s manufacturer. This optional entry specifies the name of the graphics device.

This optional entry specifies the chipset used on the graphics board. In most cases, this entry is not required because the X servers will probe the hardware to determine the chipset type.

XF86Config 1205

Ramdac ramdac-type

This optional entry specifies the type of RAMDAC used on the graphics board. This is only used by a few of the X servers, and in most cases, it is not required because the X servers will probe the hardware to determine the RAMDAC type where possible.

DacSpeed speed

This optional entry specifies the RAMDAC speed rating (which is usually printed on the RAMDAC chip). The speed is in MHz. This is only used by a few of the X servers and only needs to be specified when the speed rating of the RAMDAC is different from the default built in to the X server.

Clocks clock ...

Specifies the dotclocks that are on your graphics board. The clocks are in MHz

 

and may be specified as a floating-point number. The value is stored internally to

 

the nearest kHz. The ordering of the clocks is important. It must match the

 

order in which they are selected on the graphics board. Multiple Clocks lines may

 

be specified. For boards with programmable clock chips, the ClockChip entry

 

should be used instead of this. A Clocks entry is not mandatory for boards with

 

non-programmable clock chips but is highly recommended because it prevents

 

the clock probing phase during server startup. This clock probing phase can

 

cause problems for some monitors.

ClockChip clockchip-type

This optional entry is used to specify the clock chip type on graphics boards that

 

have a programmable clock generator. Only a few X servers support program-

 

mable clock chips. For details, see the appropriate X server manual page.

ClockProg command [textclock]

This optional entry runs command to set the clock on the graphics board instead of

 

using the internal code. The command string must consist of the full pathname

 

(and no flags). When using this option, a Clocks entry is required to specify

 

which clock values are to be made available to the server (up to 128 clocks may

 

be specified). The optional textclock value is to tell the server that command must

 

be run to restore the text-mode clock at server exit (or when VT switching).

 

textclock must match one of the values in the Clocks entry. This parameter is

 

required when the clock used for text mode is a programmable clock.

 

The command is run with the real user’s ID with stdin and stdout set to the

 

graphics console device. Two arguments are passed to the command. The first is

 

the clock frequency in MHz as a floating-point number and the second is the

 

index of the clock in the Clocks entry. The command should return an exit status

 

of 0 when successful and something in the range 1–254 otherwise.

 

The command is run when the initial graphics mode is set and when changing

 

screen resolution with the hotkey sequences. If the program fails at initialization,

 

the server exits. If it fails during a mode switch, the mode switch is aborted but

 

the server keeps running. It is assumed that if the command fails, the clock has

 

not been changed.

Option optionstring

This optional entry allows the user to select certain options provided by the

 

drivers. Multiple Option entries may be given. The supported values for

 

optionstring are given in the appropriate X server manual pages.

VideoRam mem

This optional entry specifies the amount of video RAM that is installed on the graphics board. This is measured in kilobytes. In most cases, this is not required because the X server probes the graphics board to determine this quantity.

BIOSBase baseaddress

This optional entry specifies the base address of the video BIOS for the VGA

 

board. This address is usually 0xC0000, which is the default the X servers use.

 

Some systems, particularly those with on-board VGA hardware, have the BIOS

 

located at an alternate address, usually 0xE0000. If your video BIOS is at an

 

address other than 0xC0000, you must specify the base address in the XF86Config

 

file. Note that some X servers don’t access the BIOS at all and those that do only

 

use the BIOS when searching for information during the hardware probe phase.

XF86_S3(1)
XF86_S3(1)
XF86_S3(1)

 

Part V: File Formats

1206

 

 

 

MemBase baseaddress

This optional entry specifies the memory base address of a graphics board’s linear

 

frame buffer. This entry is only used by a few X servers, and the interpretation of

 

this base address may be different for different X servers. Refer to the appropriate

 

X server manual page for details.

IOBase baseaddress

This optional entry specifies the IO base address. This entry is only used for a few X servers. Refer to the appropriate X server manual page for details.

DACBase baseaddress

POSBase baseaddress

COPBase baseaddress

VGABase baseaddress

Instance number

Speedup selection

S3MNAdjust MN

S3MClk clock

S3RefClock clock

This optional entry specifies the DAC base address. This entry is only used for a few X servers. Refer to the appropriate X server manual page for details.

This optional entry specifies the POS base address. This entry is only used for a few X servers. Refer to the appropriate X server manual page for details.

This optional entry specifies the coprocessor base address. This entry is only used for a few X servers. Refer to the appropriate X server manual page for details.

This optional entry specifies the VGA memory base address. This entry is only used for a few X servers. Refer to the appropriate X server manual page for details.

This optional entry specifies the instance (which indicates if the chip is integrated on the motherboard or on an expansion card). This entry is only used for a few X servers. Refer to the appropriate X server manual page for details.

This optional entry specifies the selection of speedups to be enabled. This entry is only used for a few X servers. Refer to the appropriate X server manual page for details.

This optional entry is specific to the S3 X server. For details, refer to the manual page.

This optional entry is specific to the S3 X server. For details, refer to the manual page.

This optional entry is specific to the S3 X server. For details, refer to the manual page.

The Screen sections are used to specify which graphics boards and monitors are used with a particular X server and the configuration in which they are to be used. The entries available for this section are

Driver driver-name

Each Screen section must begin with a Driver entry, and the driver-name given in

 

each Screen section must be unique. The driver-name determines which X server

 

(or driver type within an X server when an X server supports more than one

 

head) reads and uses a particular Screen section. The driver names available are

 

Accel

 

Mono

 

SVGA

 

VGA2

 

VGA16

 

Accel is used by all the accelerated X servers (see XF86_Accel(1)). Mono is used by

 

the non-VGA mono drivers in the 2-bit and 4-bit X servers (see XF86_Mono(1) and

 

XF86_VGA16(1)). VGA2 and VGA16 are used by the VGA drivers in the 2-bit and 4-bit

 

X servers. SVGA is used by the XF86_SVGA X server.

Device device-id

Specifies which graphics device description is to be used.

Monitor monitor-id

Specifies which monitor description is to be used.

ScreenNo scrnum

This optional entry overrides the default screen numbering in a multi-headed

 

configuration. The default numbering is determined by the ordering of the

 

Screen sections in the XF86Config file. To override this, all relevant Screen

 

sections must have this entry specified.

 

XF86Config

 

 

 

 

1207

 

 

 

 

 

 

 

BlankTime time

Sets the inactivity time-out for the blanking phase of the screensaver. time is in

 

 

minutes, and the default is 10. This is equivalent to the X server’s -s flag, and the

 

 

value can be changed at runtime with xset(1).

 

SuspendTime time

Sets the inactivity time-out for the “suspend” phase of the screensaver. time is in

 

 

minutes, the default is 15, and it can be changed at runtime with xvidtune(1). This

 

is only suitable for VESA DPMS compatible monitors and is only supported

 

 

currently by some X servers. The “power_saverOption must be set for this to be

 

 

enabled.

 

OffTime time

Sets the inactivity time-out for the “off” phase of the screensaver. time is in minutes,

 

the default is 30, and it can be changed at runtime with xvidtune(1). This is only

 

 

suitable for VESA DPMS compatible monitors and is only supported currently by

 

 

some X servers. The “power_saverOption must be set for this to be enabled.

 

SubSection Display

This entry is a subsection that is used to specify some display specific parameters.

 

 

This subsection is terminated by an EndSubSection entry. For some X servers and

 

 

drivers (those requiring a list of video modes), this subsection is mandatory. For X

 

 

servers that support multiple display depths, more than one Display subsec-tion can

 

be present. When multiple Display subsections are present, each must have a unique

 

Depth entry. The entries available for the Display subsection are

 

Depth bpp

This entry is mandatory when more than one Display subsection is present in a

 

 

Screen section. When only one Display subsection is present, it specifies the default

 

depth where the X server will run. When more than one Display subsection is

 

 

present, the depth determines which gets used by the X server. The subsection used

 

is the one matching the depth at which the X server is run. Not all X servers (or

 

 

drivers) support more than one depth. Permitted values for bpp are 8, 15, 16, 24, and

 

32. Not all X servers (or drivers) support all these values. bpp values of 24 and 32 are

 

 

treated equivalently by those X servers that support them.

 

Weight RGB

This optional entry specifies the relative RGB weighting to be used for an X server

 

 

running at 16bpp. This may also be specified from the command line (see

 

 

XFree86(1)). Values supported by most 16bpp X servers are 555 and 565. For further

 

details, refer to the appropriate X server manual page.

 

Virtual xdim ydim

This optional entry specifies the virtual screen resolution to be used. xdim must be a

 

multiple of either 8 or 16 for most color X servers and a multiple of 32 for the

 

 

monochrome X server. The given value is rounded down if this is not the case. For

 

 

most X servers, video modes that are too large for the specified virtual size are

 

 

rejected. If this entry is not present, the virtual screen resolution is set to accommo-

 

date all the valid video modes given in the Modes entry. Some X servers do not

 

 

support this entry. Refer to the appropriate X server manual pages for details.

 

ViewPort x0 y0

This optional entry sets the upper-left corner of the initial display. This is only relevant when the virtual screen resolution is different from the resolution of the initial video mode. If this entry is not given, then the initial display is centered in the virtual display area.

Modes modename ...

This entry is mandatory for most X servers, and it specifies the list of video modes to

 

use. The video mode names must correspond to those specified in the appropriate

 

Monitor section. Most X servers delete modes from this list that don’t satisfy various

 

requirements. The first valid mode in this list is the default display mode for startup.

 

The list of valid modes is converted internally into a circular list. It is possible to

 

switch to the next mode with Ctrl+Alt+Keypad Plus and to the previous mode with

 

Ctrl+Alt+Keypad Minus.

InvertVCLK modename 0|1

This optional entry is specific to the S3 server only. It can be used to change the

 

default VCLK invert/non-invert state for individual modes. If modenameis “”, the

 

setting applies to all modes unless overridden by later entries.

 

Part V: File Formats

1208

 

 

 

EarlySC modename 0|1

This optional entry is specific to the S3 server only. It can be used to change the

 

default EarlySC setting for individual modes. This setting can affect screen wrapping.

 

If modenameis “”, the setting applies to all modes unless overridden by later entries.

BlankDelay modename value1 value2

This optional entry is specific to the S3 server only. It can be used to change the

 

default blank delay settings for individual modes. This can affect screen wrapping.

 

value1 and value2 must be integers in the range 0–7. If modenameis “”, the setting

 

applies to all modes unless overridden by later entries.

Visual visual-name

This optional entry sets the default root visual type. This can also be specified from

 

the command line (see Xserver(1)). The visual types available for 8bpp X servers are

 

(default is PseudoColor):

 

StaticGray

 

GrayScale

 

StaticColor

 

PseudoColor

 

TrueColor

 

DirectColor

 

The visual type available for the 16bpp and 32bpp X servers is TrueColor.

 

The visual type available for the 1bpp X server is StaticGray.

 

The visual types available for the 4bpp X server are (default is PseudoColor):

 

StaticGray

 

GrayScale

 

StaticColor

 

PseudoColor

Option optionstring

This optional entry allows the user to select certain options provided by the drivers.

 

Multiple Option entries can be given. The supported values for option-string are

 

given in the appropriate X server manual pages.

Black red green blue

This optional entry allows the “black” color to be specified. This is only supported

 

with the VGA2 driver in the XF86_Mono server (for details, see XF86_Mono(1)).

White red green blue

This optional entry allows the “white” color to be specified. This is only supported

 

with the VGA2 driver in the XF86_Mono server (for details, see XF86_Mono(1)).

For an example of an XF86Config file, see the file installed as <XRoot>/lib/X11/XF86Config.eg.

FILES

/etc/XF86Config

<XRoot>/lib/X11/XF86Config. hostname <XRoot>/lib/X11/XF86Config

Note that <XRoot> refers to the root of the X11 install tree.

SEE ALSO

X(1), Xserver(1), XFree86(1), XF86_SVGA(1), XF86_VGA16(1), XF86_Mono(1), XF86_S3(1), XF86_8514(1), XF86_Mach8(1), XF86_Mach32(1), XF86_P9000(1), XF86_AGX(1), XF86_W32(1)

AUTHORS

Refer to the XFree86(1) manual page.

Соседние файлы в предмете Операционные системы