diff options
Diffstat (limited to 'man5')
-rw-r--r-- | man5/acct.5 | 42 | ||||
-rw-r--r-- | man5/charmap.5 | 128 | ||||
-rw-r--r-- | man5/complex.5 | 49 | ||||
-rw-r--r-- | man5/dir_colors.5 | 343 | ||||
-rw-r--r-- | man5/elf.5 | 1369 | ||||
-rw-r--r-- | man5/environ.5 | 221 | ||||
-rw-r--r-- | man5/fs.5 | 162 | ||||
-rw-r--r-- | man5/ftpusers.5 | 46 | ||||
-rw-r--r-- | man5/group.5 | 54 | ||||
-rw-r--r-- | man5/host.conf.5 | 192 | ||||
-rw-r--r-- | man5/hosts.5 | 107 | ||||
-rw-r--r-- | man5/hosts.equiv.5 | 56 | ||||
-rw-r--r-- | man5/intro.5 | 33 | ||||
-rw-r--r-- | man5/ipc.5 | 383 | ||||
-rw-r--r-- | man5/issue.5 | 38 | ||||
-rw-r--r-- | man5/locale.5 | 576 | ||||
-rw-r--r-- | man5/motd.5 | 40 | ||||
-rw-r--r-- | man5/nologin.5 | 37 | ||||
-rw-r--r-- | man5/nscd.conf.5 | 125 | ||||
-rw-r--r-- | man5/nsswitch.conf.5 | 264 | ||||
-rw-r--r-- | man5/passwd.5 | 127 | ||||
-rw-r--r-- | man5/proc.5 | 1462 | ||||
-rw-r--r-- | man5/protocols.5 | 82 | ||||
-rw-r--r-- | man5/resolv.conf.5 | 195 | ||||
-rw-r--r-- | man5/resolver.5 | 1 | ||||
-rw-r--r-- | man5/rpc.5 | 74 | ||||
-rw-r--r-- | man5/securetty.5 | 43 | ||||
-rw-r--r-- | man5/services.5 | 207 | ||||
-rw-r--r-- | man5/shells.5 | 52 | ||||
-rw-r--r-- | man5/slabinfo.5 | 111 | ||||
-rw-r--r-- | man5/termcap.5 | 451 | ||||
-rw-r--r-- | man5/ttytype.5 | 64 | ||||
-rw-r--r-- | man5/tzfile.5 | 138 | ||||
-rw-r--r-- | man5/utmp.5 | 242 | ||||
-rw-r--r-- | man5/wtmp.5 | 1 |
35 files changed, 7515 insertions, 0 deletions
diff --git a/man5/acct.5 b/man5/acct.5 new file mode 100644 index 000000000..6b1ebfe0a --- /dev/null +++ b/man5/acct.5 @@ -0,0 +1,42 @@ +.\" Copyright (c) 1995 Dirk Eddelbuettel (Dirk.Eddelbuettel@qed.econ.queensu.ca) +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +.\" USA. +.\" +.TH ACCT 5 2003-11-01 "Linux" "Linux Programmer's Manual" +.SH NAME +acct \- execution accounting file +.SH SYNOPSIS +.B #include <sys/acct.h> +.SH DESCRIPTION +If the kernel was compiled with the process accounting option enabled, +the system call +.RS +acct("/somewhere/accountingfile"); +.RE +will start the process accounting. Each time a process terminates +a record for this process is appended to the accounting file. +The accounting structure +.B "struct acct" +is also described in the file +.IR /usr/include/linux/acct.h . +.SH "SEE ALSO" +.BR sa (1), +.BR acct (2) diff --git a/man5/charmap.5 b/man5/charmap.5 new file mode 100644 index 000000000..6755b7cef --- /dev/null +++ b/man5/charmap.5 @@ -0,0 +1,128 @@ +.\" Hey emacs, this is -*- nroff -*- +.\" +.\" This file is part of locale(1) which displays the settings of the +.\" current locale. +.\" Copyright (C) 1994 Jochen Hein (Hein@Student.TU-Clausthal.de) +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software +.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. +.\" +.TH CHARMAP 5 1994-11-28 "National Language Support" "Linux User Manual" +.SH NAME +charmap \- character symbols to define character encodings +.SH DESCRIPTION +A character set description (charmap) defines a characterset of +available characters and their encodings. All supported character +sets should have the +.B portable character set +as a proper subset. +.\" Not true anymore: +.\" The portable character set is defined in the file +.\" .I /usr/lib/nls/charmap/POSIX +.\" .I /usr/share/i18n/charmap/POSIX +.\" for reference purposes. +.SH SYNTAX +The charmap file starts with a header, that may consist of the +following keywords: +.TP +.I <codeset> +is followed by the name of the codeset. +.TP +.I <mb_cur_max> +is followed by the max number of bytes for a multibyte-character. +Multibyte characters are currently not supported. The default value +is 1. +.TP +.I <mb_cur_min> +is followed by the min number of bytes for a character. This +value must be less or equal than +.B mb_cur_max. +If not specified, it defaults to +.B mb_cur_max. +.TP +.I <escape_char> +is followed by a character that should be used as the +escape-character for the rest of the file to mark characters that +should be interpreted in a special way. It defaults to +the backslash ( +.B \\\\ +). +.TP +.I <comment_char> +is followed by a character that will be used as the +comment-character for the rest of the file. It defaults to the +number sign ( +.B # +). + +.PP +The charmap-definition itself starts with the keyword +.B CHARMAP +in column 1. + +The following lines may have one of the two following forms to +define the character-encodings: +.TP +.I <symbolic-name> <encoding> <comments> +This form defines exactly one character and its encoding. + +.TP +.I <symbolic-name>...<symbolic-name> <encoding> <comments> +This form defines a couple of characters. This is only useful for +mutlibyte-characters, which are currently not implemented. + +.PP +The last line in a charmap-definition file must contain +.B END CHARMAP. +.SH "SYMBOLIC NAMES" +A +.B symbolic name +for a character contains only characters of the +.B portable character set. +The name itself is enclosed between angle brackets. +Characters following an +.B <escape_char> +are interpreted as itself; for example, the sequence +.B '<\\\\\\\\\\\\>>' +represents the symbolic name +.B '\\\\>' +enclosed in angle brackets. +.SH "CHARACTER ENCODING" +The +encoding may be in each of the following three forms: +.TP +.I <escape_char>d<number> +with a decimal number +.TP +.I <escape_char>x<number> +with a hexadecimal number +.TP +.I <escape_char><number> +with an octal number. + +.\" XXX - comments +.\" XXX - char ... char + +.SH FILES +.I /usr/share/i18n/charmaps/* +.SH AUTHOR +Jochen Hein (jochen.hein@delphi.central.de) +.SH "CONFORMING TO" +POSIX.2 +.SH "SEE ALSO" +.BR locale (1), +.BR localedef (1), +.BR localeconv (3), +.BR setlocale (3), +.BR locale (5) diff --git a/man5/complex.5 b/man5/complex.5 new file mode 100644 index 000000000..1347aded6 --- /dev/null +++ b/man5/complex.5 @@ -0,0 +1,49 @@ +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" Distributed under GPL +.\" +.TH COMPLEX 5 2002-07-28 "" "complex math" +.SH NAME +complex \- basics of complex mathematics +.SH SYNOPSIS +.B #include <complex.h> +.SH DESCRIPTION +Complex numbers are numbers of the form z = a+b*i, where a and b are +real numbers and i = sqrt(-1), so that i*i = -1. +.br +There are other ways to represent that number. The pair (a,b) of real +numbers may be viewed as a point in the plane, given by X- and +Y-coordinates. This same point may also be described by giving +the pair of real numbers (r,phi), where r is the distance to the origin O, +and phi the angle between the X-axis and the line Oz. Now +z = r*exp(i*phi) = r*(cos(phi)+i*sin(phi)). +.PP +The basic operations are defined on z = a+b*i and w = c+d*i as: +.TP +.B addition: z+w = (a+c) + (b+d)*i +.TP +.B multiplication: z*w = (a*c - b*d) + (a*d + b*c)*i +.TP +.B division: z/w = ((a*c + b*d)/(c*c + d*d)) + ((b*c - a*d)/(c*c + d*d))*i +.PP +Nearly all math function have a complex counterpart but there are +some complex only functions. +.SH EXAMPLE +Your C-compiler can work with complex numbers if it supports the C99 standard. +Link with -lm. The imaginary unit is represented by I. +.sp +.nf +/* check that exp(i*pi) == -1 */ +#include <math.h> /* for atan */ +#include <complex.h> +main() { + double pi = 4*atan(1); + complex z = cexp(I*pi); + printf("%f+%f*i\\n", creal(z), cimag(z)); +} +.fi +.SH "SEE ALSO" +.BR cabs (3), +.BR carg (3), +.BR cexp (3), +.BR cimag (3), +.BR creal (3) diff --git a/man5/dir_colors.5 b/man5/dir_colors.5 new file mode 100644 index 000000000..e8b814b61 --- /dev/null +++ b/man5/dir_colors.5 @@ -0,0 +1,343 @@ +.\" +.\" manpage for /etc/dir_colors, config file for dircolors(1) +.\" extracted from color-ls 3.12.0.3 dircolors(1) manpage +.\" +.\" This file may be copied under the conditions described +.\" in the LDP GENERAL PUBLIC LICENSE, Version 1, September 1998 +.\" that should have been distributed together with this file. +.\" +.\" Modified Sat Dec 22 22:25:33 2001 by Martin Schulze <joey@infodrom.org> +.\" +.TH DIR_COLORS 5 2001-12-26 "GNU fileutils 4.1" +.SH NAME +dir_colors \- configuration file for dircolors(1) +.SH DESCRIPTION +The program +.BR ls (1) +uses the environment variable +.B LS_COLORS +to determine the colors in which the filenames are to be displayed. +This environment variable is usually set by a command like + +.RS +eval `dircolors some_path/dir_colors` +.RE + +found in a system default shell initialization file, like +.I /etc/profile +or +.IR /etc/csh.cshrc . +(See also +.BR dircolors (1).) +Usually, the file used here is +.I /etc/DIR_COLORS +and can be overridden by a +.I .dir_colors +file in one's home directory. +.PP +This configuration file consists of several statements, one per line. +Anything right of a hash mark (#) is treated as a comment, if the +hash mark is at the beginning of a line or is preceded by at least one +whitespace. Blank lines are ignored. +.PP +The +.I global +section of the file consists of any statement before the first +.B TERM +statement. Any statement in the global section of the file is +considered valid for all terminal types. Following the global section +is one or more +.I terminal-specific +sections, preceded by one or more +.B TERM +statements which specify the terminal types (as given by the +.B TERM +environment variable) the following declarations apply to. It is +always possible to override a global declaration by a subsequent +terminal-specific one. +.PP +The following statements are recognized; case is insignificant: +.PP +.TP +.B TERM \fIterminal-type\fR +Starts a terminal-specific section and specifies which terminal it +applies to. Multiple +.B TERM +statements can be used to create a section which applies for several +terminal types. +.TP +.B COLOR yes|all|no|none|tty +(Slackware only; ignored by GNU +.BR dircolors (1).) +Specifies that colorization should always be enabled (\fIyes\fR or +\fIall\fR), never enabled (\fIno\fR or \fInone\fR), or enabled only if +the output is a terminal (\fItty\fR). The default is \fIno\fR. +.TP +.B EIGHTBIT yes|no +(Slackware only; ignored by GNU +.BR dircolors (1).) +Specifies that eight-bit ISO 8859 characters should be enabled by +default. For compatibility reasons, this can also be specified as 1 for +\fIyes\fR or 0 for \fIno\fR. The default is \fIno\fR. +.TP +.B OPTIONS \fIoptions\fR +(Slackware only; ignored by GNU +.BR dircolors (1).) +Adds command line options to the default +.B ls +command line. The options can be any valid +.B ls +command line options, and should include the leading minus sign. +Please note that +.B dircolors +does not verify the validity of these options. +.TP +.B NORMAL \fIcolor-sequence\fR +Specifies the color used for normal (non-filename) text. +.TP +.B FILE \fIcolor-sequence\fR +Specifies the color used for a regular file. +.TP +.B DIR \fIcolor-sequence\fR +Specifies the color used for directories. +.TP +.B LINK \fIcolor-sequence\fR +Specifies the color used for a symbolic link. +.TP +.B ORPHAN \fIcolor-sequence\fR +Specifies the color used for an orphaned symbolic link (one which +points to a nonexistent file). If this is unspecified, +.B ls +will use the +.B LINK +color instead. +.TP +.B MISSING \fIcolor-sequence\fR +Specifies the color used for a missing file (a nonexistent file which +nevertheless has a symbolic link pointing to it). If this is unspecified, +.B ls +will use the +.B FILE +color instead. +.TP +.B FIFO \fIcolor-sequence\fR +Specifies the color used for a FIFO (named pipe). +.TP +.B SOCK \fIcolor-sequence\fR +Specifies the color used for a socket. +.TP +.B DOOR \fIcolor-sequence\fR +(Supported since file-utils 4.1) +Specifies the color used for a door (Solaris 2.5 and later). +.TP +.B BLK \fIcolor-sequence\fR +Specifies the color used for a block device special file. +.TP +.B CHR \fIcolor-sequence\fR +Specifies the color used for a character device special file. +.TP +.B EXEC \fIcolor-sequence\fR +Specifies the color used for a file with the executable attribute set. +.TP +.B LEFTCODE \fIcolor-sequence\fR +Specifies the +.I "left code" +for non-ISO\ 6429 terminals (see below). +.TP +.B RIGHTCODE \fIcolor-sequence\fR +Specifies the +.I "right code" +for non-ISO\ 6429 terminals (see below). +.TP +.B ENDCODE \fIcolor-sequence\fR +Specifies the +.I "end code" +for non-ISO\ 6429 terminals (see below). +.TP +\fB*\fIextension\fR \fIcolor-sequence\fR +Specifies the color used for any file that ends in \fIextension\fR. +.TP +\fB .\fIextension\fR \fIcolor-sequence\fR +Same as \fB*\fR.\fIextension\fR. Specifies the color used for any file that +ends in .\fIextension\fR. Note that the period is included in the +extension, which makes it impossible to specify an extension not +starting with a period, such as +.B ~ +for +.B emacs +backup files. This form should be considered obsolete. +.SH "ISO 6429 (ANSI) COLOR SEQUENCES" +Most color-capable ASCII terminals today use ISO 6429 (ANSI) color sequences, +and many common terminals without color capability, including +.B xterm +and the widely used and cloned DEC VT100, will recognize ISO 6429 color +codes and harmlessly eliminate them from the output or emulate them. +.B ls +uses ISO 6429 codes by default, assuming colorization is enabled. + +ISO 6429 color sequences are composed of sequences of numbers +separated by semicolons. The most common codes are: +.sp +.RS +.2i +.ta 1.0i +.nf + 0 to restore default color + 1 for brighter colors + 4 for underlined text + 5 for flashing text +30 for black foreground +31 for red foreground +32 for green foreground +33 for yellow (or brown) foreground +34 for blue foreground +35 for purple foreground +36 for cyan foreground +37 for white (or gray) foreground +40 for black background +41 for red background +42 for green background +43 for yellow (or brown) background +44 for blue background +45 for purple background +46 for cyan background +47 for white (or gray) background +.fi +.RE +.sp +Not all commands will work on all systems or display devices. +.PP +.B ls +uses the following defaults: +.sp +.RS +.2i +.ta 1.0i 2.5i +.nf +\fBNORMAL\fR 0 Normal (non-filename) text +\fBFILE\fR 0 Regular file +\fBDIR\fR 32 Directory +\fBLINK\fR 36 Symbolic link +\fBORPHAN\fR undefined Orphanned symbolic link +\fBMISSING\fR undefined Missing file +\fBFIFO\fR 31 Named pipe (FIFO) +\fBSOCK\fR 33 Socket +\fBBLK\fR 44;37 Block device +\fBCHR\fR 44;37 Character device +\fBEXEC\fR 35 Executable file +.fi +.RE +.sp +A few terminal programs do not recognize the default +properly. If all text gets colorized after you do a directory +listing, change the +.B NORMAL +and +.B FILE +codes to the numerical codes for your normal foreground and background +colors. +.SH "OTHER TERMINAL TYPES (ADVANCED CONFIGURATION)" +If you have a color-capable (or otherwise highlighting) terminal (or +printer!) which uses a different set of codes, you can still generate +a suitable setup. To do so, you will have to use the +.BR LEFTCODE , +.BR RIGHTCODE , +and +.BR ENDCODE +definitions. +.PP +When writing out a filename, +.B ls +generates the following output sequence: +.B LEFTCODE +.I typecode +.B RIGHTCODE +.I filename +.BR ENDCODE , +where the +.I typecode +is the color sequence that depends on the type or name of file. If the +.B ENDCODE +is undefined, the sequence +.B "LEFTCODE NORMAL RIGHTCODE" +will be used instead. The purpose of the left- and rightcodes is +merely to reduce the amount of typing necessary (and to hide ugly +escape codes away from the user). If they are not appropriate for +your terminal, you can eliminate them by specifying the respective +keyword on a line by itself. +.PP +.B NOTE: +If the +.B ENDCODE +is defined in the global section of the setup file, it +.I cannot +be undefined in a terminal-specific section of the file. This means +any +.B NORMAL +definition will have no effect. A different +.B ENDCODE +can, however, be specified, which would have the same effect. +.SH "ESCAPE SEQUENCES" +To specify control- or blank characters in the color sequences or +filename extensions, either C-style \e-escaped notation or +.BR stty -style +^-notation can be used. The C-style notation +includes the following characters: +.sp +.RS +.2i +.ta 1.0i +.nf +\fB\ea\fR Bell (ASCII 7) +\fB\eb\fR Backspace (ASCII 8) +\fB\ee\fR Escape (ASCII 27) +\fB\ef\fR Form feed (ASCII 12) +\fB\en\fR Newline (ASCII 10) +\fB\er\fR Carriage Return (ASCII 13) +\fB\et\fR Tab (ASCII 9) +\fB\ev\fR Vertical Tab (ASCII 11) +\fB\e?\fR Delete (ASCII 127) +\fB\e\fInnn\fR Any character (octal notation) +\fB\ex\fInnn\fR Any character (hexadecimal notation) +\fB\e_\fR Space +\fB\e\e\fR Backslash (\e) +\fB\e^\fR Caret (^) +\fB\e#\fR Hash mark (#) +.fi +.RE +.sp +Please note that escapes are necessary to enter a space, backslash, +caret, or any control character anywhere in the string, as well as a +hash mark as the first character. +.SH NOTES +The default +.B LEFTCODE +and +.B RIGHTCODE +definitions, which are used by ISO 6429 terminals are: +.sp +.RS +.2i +.ta 1.0i +.nf +\fBLEFTCODE\fR \ee[ +\fBRIGHTCODE\fR m +.fi +.RE +.sp +The default +.B ENDCODE +is undefined. +.SH "SEE ALSO" +.BR dircolors (1), +.BR ls (1), +.BR stty (1), +.BR xterm (1) +.SH FILES +.TP +.I /etc/DIR_COLORS +System-wide configuration file. +.TP +.I ~/.dir_colors +Per-user configuration file. +.SH NOTES +This page describes the +.B dir_colors +file format as used in the fileutils-4.1 package; +other versions may differ slightly. diff --git a/man5/elf.5 b/man5/elf.5 new file mode 100644 index 000000000..7d9671457 --- /dev/null +++ b/man5/elf.5 @@ -0,0 +1,1369 @@ +.\" $OpenBSD: elf.5,v 1.12 2003/10/27 20:23:58 jmc Exp $ +.\"Copyright (c) 1999 Jeroen Ruigrok van der Werven +.\"All rights reserved. +.\" +.\"Redistribution and use in source and binary forms, with or without +.\"modification, are permitted provided that the following conditions +.\"are met: +.\"1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\"2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\"THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\"ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\"ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\"OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\"HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\"SUCH DAMAGE. +.\" +.\" $FreeBSD: src/share/man/man5/elf.5,v 1.21 2001/10/01 16:09:23 ru Exp $ +.\" +.\" Slightly adapted - aeb, 2004-01-01 +.Dd July 31, 1999 +.Dt ELF 5 +.Os +.Sh NAME +.Nm elf +.Nd format of ELF executable binary files +.Sh SYNOPSIS +.\" .Fd #include <elf_abi.h> +.Fd #include <elf.h> +.Sh DESCRIPTION +The header file +.\" .Aq Pa elf_abi.h +.Aq Pa elf.h +defines the format of ELF executable binary files. +Amongst these files are +normal executable files, relocatable object files, core files and shared +libraries. +.Pp +An executable file using the ELF file format consists of an ELF header, +followed by a program header table or a section header table, or both. +The ELF header is always at offset zero of the file. +The program header +table and the section header table's offset in the file are defined in the +ELF header. +The two tables describe the rest of the particularities of +the file. +.Pp +.\" Applications which wish to process ELF binary files for their native +.\" architecture only should include +.\" .Aq Pa elf_abi.h +.\" in their source code. +.\" These applications should need to refer to +.\" all the types and structures by their generic names +.\" .Dq Elf_xxx +.\" and to the macros by +.\" .Dq ELF_xxx . +.\" Applications written this way can be compiled on any architecture, +.\" regardless of whether the host is 32-bit or 64-bit. +.\" .Pp +.\" Should an application need to process ELF files of an unknown +.\" architecture, then the application needs to explicitly use either +.\" .Dq Elf32_xxx +.\" or +.\" .Dq Elf64_xxx +.\" type and structure names. +.\" Likewise, the macros need to be identified by +.\" .Dq ELF32_xxx +.\" or +.\" .Dq ELF64_xxx . +.\" .Pp +This header file describes the above mentioned headers as C structures +and also includes structures for dynamic sections, relocation sections and +symbol tables. +.Pp +The following types are used for N-bit architectures (N=32,64, +ElfN stands for Elf32 or Elf64, uintN_t stands for uint32_t or uint64_t): +.Bd -literal -offset indent +ElfN_Addr Unsigned program address, uintN_t +ElfN_Off Unsigned file offset, uintN_t +ElfN_Section Unsigned section index, uint16_t +ElfN_Versym Unsigned version symbol information, uint16_t +Elf_Byte unsigned char +ElfN_Half uint16_t +ElfN_Sword int32_t +ElfN_Word uint32_t +ElfN_Sxword int64_t +ElfN_Xword uint64_t +.\" Elf32_Size Unsigned object size +.Ed +.Pp +(Note: The *BSD terminology is a bit different. There Elf64_Half is +twice as large as Elf32_Half, and Elf64Quarter is used for uint16_t. +In order to avoid confusion these types are replaced by explicit ones +in the below.) +.Pp +All data structures that the file format defines follow the +.Dq natural +size and alignment guidelines for the relevant class. +If necessary, +data structures contain explicit padding to ensure 4-byte alignment +for 4-byte objects, to force structure sizes to a multiple of 4, etc. +.Pp +The ELF header is described by the type Elf32_Ehdr or Elf64_Ehdr: +.Bd -literal -offset indent +#define EI_NIDENT 16 + +typedef struct { + unsigned char e_ident[EI_NIDENT]; + uint16_t e_type; + uint16_t e_machine; + uint32_t e_version; + ElfN_Addr e_entry; + ElfN_Off e_phoff; + ElfN_Off e_shoff; + uint32_t e_flags; + uint16_t e_ehsize; + uint16_t e_phentsize; + uint16_t e_phnum; + uint16_t e_shentsize; + uint16_t e_shnum; + uint16_t e_shstrndx; +} ElfN_Ehdr; +.Ed +.Pp +The fields have the following meanings: +.Bl -tag -width "e_phentsize" -offset indent +.It Dv e_ident +This array of bytes specifies to interpret the file, +independent of the processor or the file's remaining contents. +Within this array everything is named by macros, which start with +the prefix +.Sy EI_ +and may contain values which start with the prefix +.Sy ELF . +The following macros are defined: +.Bl -tag -width "EI_VERSION" \" EI_ABIVERSION +.It Dv EI_MAG0 +The first byte of the magic number. +It must be filled with +.Sy ELFMAG0 . +(0: 0x7f) +.It Dv EI_MAG1 +The second byte of the magic number. +It must be filled with +.Sy ELFMAG1 . +(1: 'E') +.It Dv EI_MAG2 +The third byte of the magic number. +It must be filled with +.Sy ELFMAG2 . +(2: 'L') +.It Dv EI_MAG3 +The fourth byte of the magic number. +It must be filled with +.Sy ELFMAG3 . +(3: 'F') +.It Dv EI_CLASS +The fifth byte identifies the architecture for this binary: +.Pp +.Bl -tag -width "ELFCLASSNONE" -compact +.It Dv ELFCLASSNONE +This class is invalid. +.It Dv ELFCLASS32 +This defines the 32-bit architecture. +It supports machines with files +and virtual address spaces up to 4 Gigabytes. +.It Dv ELFCLASS64 +This defines the 64-bit architecture. +.El +.It Dv EI_DATA +The sixth byte specifies the data encoding of the processor-specific +data in the file. +Currently these encodings are supported: +.Pp +.Bl -tag -width "ELFDATA2LSB" -compact +.It Dv ELFDATANONE +Unknown data format. +.It Dv ELFDATA2LSB +Two's complement, little-endian. +.It Dv ELFDATA2MSB +Two's complement, big-endian. +.El +.It Dv EI_VERSION +The version number of the ELF specification: +.Pp +.Bl -tag -width "EV_CURRENT" -compact +.It Dv EV_NONE +Invalid version. +.It Dv EV_CURRENT +Current version. +.El +.It Dv EI_OSABI +This byte identifies the operating system +and ABI to which the object is targeted. +Some fields in other ELF structures have flags +and values that have platform specific meanings; +the interpretation of those fields is determined by the value of this byte. +E.g.: +.Pp +.Bl -tag -width "ELFOSABI_STANDALONE" -compact +.It Dv ELFOSABI_SYSV +UNIX System V ABI. +.\" 0 +.\" synonym: ELFOSABI_NONE +.It Dv ELFOSABI_HPUX +HP-UX ABI. +.\" 1 +.It Dv ELFOSABI_NETBSD +NetBSD ABI. +.\" 2 +.It Dv ELFOSABI_LINUX +Linux ABI. +.\" 3 +.\" .It Dv ELFOSABI_HURD +.\" Hurd ABI. +.\" 4 +.\" .It Dv ELFOSABI_86OPEN +.\" 86Open Common IA32 ABI. +.\" 5 +.It Dv ELFOSABI_SOLARIS +Solaris ABI. +.\" 6 +.\" .It Dv ELFOSABI_MONTEREY +.\" Monterey project ABI. Now replaced by +.\" ELFOSABI_AIX +.\" 7 +.It Dv ELFOSABI_IRIX +IRIX ABI. +.\" 8 +.It Dv ELFOSABI_FREEBSD +FreeBSD ABI. +.\" 9 +.It Dv ELFOSABI_TRU64 +TRU64 UNIX ABI. +.\" 10 +.\" ELFOSABI_MODESTO +.\" 11 +.\" ELFOSABI_OPENBSD +.\" 12 +.It Dv ELFOSABI_ARM +ARM architecture ABI. +.\" 97 +.It Dv ELFOSABI_STANDALONE +Stand-alone (embedded) ABI. +.\" 255 +.El +.It Dv EI_ABIVERSION +This byte identifies the version of the ABI +to which the object is targeted. +This field is used to distinguish among incompatible versions of an ABI. +The interpretation of this version number +is dependent on the ABI identified by the EI_OSABI field. +Applications conforming to this specification use the value 0. +.It Dv EI_PAD +Start of padding. +These bytes are reserved and set to zero. +Programs +which read them should ignore them. +The value for EI_PAD will change in +the future if currently unused bytes are given meanings. +.It Dv EI_BRAND +Start of architecture identification. +.It Dv EI_NIDENT +The size of the e_ident array. +.El +.Pp +.It Dv e_type +This member of the structure identifies the object file type: +.Pp +.Bl -tag -width "ET_NONE" -compact +.It Dv ET_NONE +An unknown type. +.It Dv ET_REL +A relocatable file. +.It Dv ET_EXEC +An executable file. +.It Dv ET_DYN +A shared object. +.It Dv ET_CORE +A core file. +.El +.Pp +.It Dv e_machine +This member specifies the required architecture for an individual file. +E.g.: +.Pp +.Bl -tag -width "EM_MIPS_RS4_BE" -compact +.It Dv EM_NONE +An unknown machine. +.\" 0 +.It Dv EM_M32 +AT&T WE 32100. +.\" 1 +.It Dv EM_SPARC +Sun Microsystems SPARC. +.\" 2 +.It Dv EM_386 +Intel 80386. +.\" 3 +.It Dv EM_68K +Motorola 68000. +.\" 4 +.It Dv EM_88K +Motorola 88000. +.\" 5 +.\" .It Dv EM_486 +.\" Intel 80486. +.\" 6 +.It Dv EM_860 +Intel 80860. +.\" 7 +.It Dv EM_MIPS +MIPS RS3000 (big-endian only). +.\" 8 +.\" EM_S370 +.\" 9 +.\" .It Dv EM_MIPS_RS4_BE +.\" MIPS RS4000 (big-endian only). Deprecated. +.\" 10 +.\" EM_MIPS_RS3_LE (MIPS R3000 little-endian) +.\" 10 +.It Dv EM_PARISC +HPPA. +.\" 15 +.It Dv EM_SPARC32PLUS +SPARC with enhanced instruction set. +.\" 18 +.It Dv EM_PPC +PowerPC. +.\" 20 +.\" EM_PPC64 +.\" 21 +.\" EM_S390 +.\" 22 +.\" EM_SH +.\" 42 +.It Dv EM_SPARCV9 +SPARC v9 64-bit. +.\" 43 +.\" EM_IA_64 +.\" 50 +.\" EM_X86_64 +.\" 62 +.It Dv EM_VAX +DEC Vax. +.\" 75 +.\" EM_CRIS +.\" 76 +.\" .It Dv EM_ALPHA +.\" Compaq [DEC] Alpha. +.\" .It Dv EM_ALPHA_EXP +.\" Compaq [DEC] Alpha with enhanced instruction set. +.El +.Pp +.It Dv e_version +This member identifies the file version: +.Pp +.Bl -tag -width "EV_CURRENT" -compact +.It Dv EV_NONE +Invalid version. +.It Dv EV_CURRENT +Current version. +.El +.It Dv e_entry +This member gives the virtual address to which the system first transfers +control, thus starting the process. +If the file has no associated entry +point, this member holds zero. +.It Dv e_phoff +This member holds the program header table's file offset in bytes. +If +the file has no program header table, this member holds zero. +.It Dv e_shoff +This member holds the section header table's file offset in bytes. +If the +file has no section header table this member holds zero. +.It Dv e_flags +This member holds processor-specific flags associated with the file. +Flag names take the form EF_`machine_flag'. +Currently no flags have been defined. +.It Dv e_ehsize +This member holds the ELF header's size in bytes. +.It Dv e_phentsize +This member holds the size in bytes of one entry in the file's program header +table; all entries are the same size. +.It Dv e_phnum +This member holds the number of entries in the program header +table. +Thus the product of +.Sy e_phentsize +and +.Sy e_phnum +gives the table's size +in bytes. +If a file has no program header, +.Sy e_phnum +holds the value zero. +.It Dv e_shentsize +This member holds a sections header's size in bytes. +A section header is one +entry in the section header table; all entries are the same size. +.It Dv e_shnum +This member holds the number of entries in the section header table. +Thus +the product of +.Sy e_shentsize +and +.Sy e_shnum +gives the section header table's size in bytes. +If a file has no section +header table, +.Sy e_shnum +holds the value of zero. +.It Dv e_shstrndx +This member holds the section header table index of the entry associated +with the section name string table. +If the file has no section name string +table, this member holds the value +.Sy SHN_UNDEF . +.Bl -tag -width "SHN_LORESERVE" +.It Dv SHN_UNDEF +This value marks an undefined, missing, irrelevant, or otherwise meaningless +section reference. +For example, a symbol +.Dq defined +relative to section number +.Sy SHN_UNDEF +is an undefined symbol. +.It Dv SHN_LORESERVE +This value specifies the lower bound of the range of reserved indices. +.It Dv SHN_LOPROC +Values greater than or equal to +.Sy SHN_HIPROC +are reserved for processor-specific semantics. +.It Dv SHN_HIPROC +Values less than or equal to +.Sy SHN_LOPROC +are reserved for processor-specific semantics. +.It Dv SHN_ABS +This value specifies absolute values for the corresponding reference. +For +example, symbols defined relative to section number +.Sy SHN_ABS +have absolute values and are not affected by relocation. +.It Dv SHN_COMMON +Symbols defined relative to this section are common symbols, such as Fortran +COMMON or unallocated C external variables. +.It Dv SHN_HIRESERVE +This value specifies the upper bound of the range of reserved +indices between +.Sy SHN_LORESERVE +and +.Sy SHN_HIRESERVE , +inclusive; the values do +not reference the section header table. +That is, the section header table +does +.Em not +contain entries for the reserved indices. +.El +.El +.Pp +An executable or shared object file's program header table is an array of +structures, each describing a segment or other information the system needs +to prepare the program for execution. +An object file +.Em segment +contains one or more +.Em sections . +Program headers are meaningful only for executable and shared object files. +A file specifies its own program header size with the ELF header's +.Sy e_phentsize +and +.Sy e_phnum +members. +The ELF program header is described by the type Elf32_Phdr or Elf64_Phdr +depending on the architecture: +.Bd -literal -offset indent +typedef struct { + uint32_t p_type; + Elf32_Off p_offset; + Elf32_Addr p_vaddr; + Elf32_Addr p_paddr; + uint32_t p_filesz; + uint32_t p_memsz; + uint32_t p_flags; + uint32_t p_align; +} Elf32_Phdr; +.Ed +.Bd -literal -offset indent +typedef struct { + uint32_t p_type; + uint32_t p_flags; + Elf64_Off p_offset; + Elf64_Addr p_vaddr; + Elf64_Addr p_paddr; + uint64_t p_filesz; + uint64_t p_memsz; + uint64_t p_align; +} Elf64_Phdr; +.Ed +.Pp +The main difference between the 32-bit and the 64-bit program header lies +in the location of the +.Sy p_flags +member in the total struct. +.Bl -tag -width "p_offset" -offset indent +.It Dv p_type +This member of the Phdr struct tells what kind of segment this array +element describes or how to interpret the array element's information. +.Bl -tag -width "PT_DYNAMIC" +.It Dv PT_NULL +The array element is unused and the other members' values are undefined. +This lets the program header have ignored entries. +.It Dv PT_LOAD +The array element specifies a loadable segment, described by +.Sy p_filesz +and +.Sy p_memsz . +The bytes from the file are mapped to the beginning of the memory +segment. +If the segment's memory size +.Pq Sy p_memsz +is larger than the file size +.Pq Sy p_filesz , +the +.Dq extra +bytes are defined to hold the value 0 and to follow the segment's +initialized area. +The file size may not be larger than the memory size. +Loadable segment entries in the program header table appear in ascending +order, sorted on the +.Sy p_vaddr +member. +.It Dv PT_DYNAMIC +The array element specifies dynamic linking information. +.It Dv PT_INTERP +The array element specifies the location and size of a null-terminated +path name to invoke as an interpreter. +This segment type is meaningful +only for executable files (though it may occur for shared objects). +However it may not occur more than once in a file. +If it is present, it must precede any loadable segment entry. +.It Dv PT_NOTE +The array element specifies the location and size for auxiliary information. +.It Dv PT_SHLIB +This segment type is reserved but has unspecified semantics. +Programs that +contain an array element of this type do not conform to the ABI. +.It Dv PT_PHDR +The array element, if present, specifies the location and size of the program +header table itself, both in the file and in the memory image of the program. +This segment type may not occur more than once in a file. +Moreover, it may +only occur if the program header table is part of the memory image of the +program. +If it is present, it must precede any loadable segment entry. +.It Dv PT_LOPROC +Values greater than or equal to +.Sy PT_HIPROC +are reserved for processor-specific semantics. +.It Dv PT_HIPROC +Values less than or equal to +.Sy PT_LOPROC +are reserved for processor-specific semantics. +.El +.Pp +.It Dv p_offset +This member holds the offset from the beginning of the file at which +the first byte of the segment resides. +.It Dv p_vaddr +This member holds the virtual address at which the first byte of the +segment resides in memory. +.It Dv p_paddr +On systems for which physical addressing is relevant, this member is +reserved for the segment's physical address. +Under +.Bx +this member is +not used and must be zero. +.It Dv p_filesz +This member holds the number of bytes in the file image of the segment. +It may be zero. +.It Dv p_memsz +This member holds the number of bytes in the memory image of the segment. +It may be zero. +.It Dv p_flags +This member holds flags relevant to the segment: +.Pp +.Bl -tag -width "PF_X" -compact +.It Dv PF_X +An executable segment. +.It Dv PF_W +A writable segment. +.It Dv PF_R +A readable segment. +.El +.Pp +A text segment commonly has the flags +.Sy PF_X +and +.Sy PF_R . +A data segment commonly has +.Sy PF_X , +.Sy PF_W +and +.Sy PF_R . +.It Dv p_align +This member holds the value to which the segments are aligned in memory +and in the file. +Loadable process segments must have congruent values for +.Sy p_vaddr +and +.Sy p_offset , +modulo the page size. +Values of zero and one mean no alignment is required. +Otherwise, +.Sy p_align +should be a positive, integral power of two, and +.Sy p_vaddr +should equal +.Sy p_offset , +modulo +.Sy p_align . +.El +.Pp +A file's section header table lets one locate all the file's sections. +The +section header table is an array of Elf32_Shdr or Elf64_Shdr structures. +The +ELF header's +.Sy e_shoff +member gives the byte offset from the beginning of the file to the section +header table. +.Sy e_shnum +holds the number of entries the section header table contains. +.Sy e_shentsize +holds the size in bytes of each entry. +.Pp +A section header table index is a subscript into this array. +Some section +header table indices are reserved. +An object file does not have sections for +these special indices: +.Bl -tag -width "SHN_LORESERVE" +.It Dv SHN_UNDEF +This value marks an undefined, missing, irrelevant or otherwise meaningless +section reference. +.It Dv SHN_LORESERVE +This value specifies the lower bound of the range of reserved indices. +.It Dv SHN_LOPROC +Values greater than or equal to +.Sy SHN_HIPROC +are reserved for processor-specific semantics. +.It Dv SHN_HIPROC +Values less than or equal to +.Sy SHN_LOPROC +are reserved for processor-specific semantics. +.It Dv SHN_ABS +This value specifies the absolute value for the corresponding reference. +For +example, a symbol defined relative to section number +.Sy SHN_ABS +has an absolute value and is not affected by relocation. +.It Dv SHN_COMMON +Symbols defined relative to this section are common symbols, such as FORTRAN +COMMON or unallocated C external variables. +.It Dv SHN_HIRESERVE +This value specifies the upper bound of the range of reserved indices. +The +system reserves indices between +.Sy SHN_LORESERVE +and +.Sy SHN_HIRESERVE , +inclusive. +The section header table does not contain entries for the +reserved indices. +.El +.Pp +The section header has the following structure: +.Bd -literal -offset indent +typedef struct { + uint32_t sh_name; + uint32_t sh_type; + uint32_t sh_flags; + Elf32_Addr sh_addr; + Elf32_Off sh_offset; + uint32_t sh_size; + uint32_t sh_link; + uint32_t sh_info; + uint32_t sh_addralign; + uint32_t sh_entsize; +} Elf32_Shdr; +.Ed +.Bd -literal -offset indent +typedef struct { + uint32_t sh_name; + uint32_t sh_type; + uint64_t sh_flags; + Elf64_Addr sh_addr; + Elf64_Off sh_offset; + uint64_t sh_size; + uint32_t sh_link; + uint32_t sh_info; + uint64_t sh_addralign; + uint64_t sh_entsize; +} Elf64_Shdr; +.Ed +.Bl -tag -width "sh_addralign" +.It Dv sh_name +This member specifies the name of the section. +Its value is an index +into the section header string table section, giving the location of +a null-terminated string. +.It Dv sh_type +This member categorizes the section's contents and semantics. +.Bl -tag -width "SHT_PROGBITS" +.It Dv SHT_NULL +This value marks the section header as inactive. +It does not +have an associated section. +Other members of the section header +have undefined values. +.It Dv SHT_PROGBITS +This section holds information defined by the program, whose +format and meaning are determined solely by the program. +.It Dv SHT_SYMTAB +This section holds a symbol table. +Typically, +.Sy SHT_SYMTAB +provides symbols for link editing, though it may also be used +for dynamic linking. +As a complete symbol table, it may contain +many symbols unnecessary for dynamic linking. +An object file can +also contain a +.Sy SHN_DYNSYM +section. +.It Dv SHT_STRTAB +This section holds a string table. +An object file may have multiple +string table sections. +.It Dv SHT_RELA +This section holds relocation entries with explicit addends, such +as type +.Sy Elf32_Rela +for the 32-bit class of object files. +An object may have multiple +relocation sections. +.It Dv SHT_HASH +This section holds a symbol hash table. +An object participating in +dynamic linking must contain a symbol hash table. +An object file may +have only one hash table. +.It Dv SHT_DYNAMIC +This section holds information for dynamic linking. +An object file may +have only one dynamic section. +.It Dv SHT_NOTE +This section holds information that marks the file in some way. +.It Dv SHT_NOBITS +A section of this type occupies no space in the file but otherwise +resembles +.Sy SHN_PROGBITS . +Although this section contains no bytes, the +.Sy sh_offset +member contains the conceptual file offset. +.It Dv SHT_REL +This section holds relocation offsets without explicit addends, such +as type +.Sy Elf32_Rel +for the 32-bit class of object files. +An object file may have multiple +relocation sections. +.It Dv SHT_SHLIB +This section is reserved but has unspecified semantics. +.It Dv SHT_DYNSYM +This section holds a minimal set of dynamic linking symbols. +An +object file can also contain a +.Sy SHN_SYMTAB +section. +.It Dv SHT_LOPROC +This value up to and including +.Sy SHT_HIPROC +is reserved for processor-specific semantics. +.It Dv SHT_HIPROC +This value down to and including +.Sy SHT_LOPROC +is reserved for processor-specific semantics. +.It Dv SHT_LOUSER +This value specifies the lower bound of the range of indices reserved for +application programs. +.It Dv SHT_HIUSER +This value specifies the upper bound of the range of indices reserved for +application programs. +Section types between +.Sy SHT_LOUSER +and +.Sy SHT_HIUSER +may be used by the application, without conflicting with current or future +system-defined section types. +.El +.Pp +.It Dv sh_flags +Sections support one-bit flags that describe miscellaneous attributes. +If a flag bit is set in +.Sy sh_flags , +the attribute is +.Dq on +for the section. +Otherwise, the attribute is +.Dq off +or does not apply. +Undefined attributes are set to zero. +.Pp +.Bl -tag -width "SHF_EXECINSTR" -compact +.It Dv SHF_WRITE +This section contains data that should be writable during process +execution. +.It Dv SHF_ALLOC +This section occupies memory during process execution. +Some control +sections do not reside in the memory image of an object file. +This +attribute is off for those sections. +.It Dv SHF_EXECINSTR +This section contains executable machine instructions. +.It Dv SHF_MASKPROC +All bits included in this mask are reserved for processor-specific +semantics. +.El +.Pp +.It Dv sh_addr +If this section appears in the memory image of a process, this member +holds the address at which the section's first byte should reside. +Otherwise, the member contains zero. +.It Dv sh_offset +This member's value holds the byte offset from the beginning of the file +to the first byte in the section. +One section type, +.Sy SHT_NOBITS , +occupies no space in the file, and its +.Sy sh_offset +member locates the conceptual placement in the file. +.It Dv sh_size +This member holds the section's size in bytes. +Unless the section type +is +.Sy SHT_NOBITS , +the section occupies +.Sy sh_size +bytes in the file. +A section of type +.Sy SHT_NOBITS +may have a non-zero size, but it occupies no space in the file. +.It Dv sh_link +This member holds a section header table index link, whose interpretation +depends on the section type. +.It Dv sh_info +This member holds extra information, whose interpretation depends on the +section type. +.It Dv sh_addralign +Some sections have address alignment constraints. +If a section holds a +doubleword, the system must ensure doubleword alignment for the entire +section. +That is, the value of +.Sy sh_addr +must be congruent to zero, modulo the value of +.Sy sh_addralign . +Only zero and positive integral powers of two are allowed. +Values of zero +or one mean the section has no alignment constraints. +.It Dv sh_entsize +Some sections hold a table of fixed-sized entries, such as a symbol table. +For such a section, this member gives the size in bytes for each entry. +This member contains zero if the section does not hold a table of +fixed-size entries. +.El +.Pp +Various sections hold program and control information: +.Bl -tag -width ".shstrtab" +.It .bss +This section holds uninitialized data that contributes to the program's +memory image. +By definition, the system initializes the data with zeros +when the program begins to run. +This section is of type +.Sy SHT_NOBITS . +The attribute types are +.Sy SHF_ALLOC +and +.Sy SHF_WRITE . +.It .comment +This section holds version control information. +This section is of type +.Sy SHT_PROGBITS . +No attribute types are used. +.It .ctors +This section holds initialized pointers to the C++ constructor functions. +This section is of type +.Sy SHT_PROGBITS . +The attribute types are +.Sy SHF_ALLOC +and +.Sy SHF_WRITE . +.It .data +This section holds initialized data that contribute to the program's +memory image. +This section is of type +.Sy SHT_PROGBITS . +The attribute types are +.Sy SHF_ALLOC +and +.Sy SHF_WRITE . +.It .data1 +This section holds initialized data that contribute to the program's +memory image. +This section is of type +.Sy SHT_PROGBITS . +The attribute types are +.Sy SHF_ALLOC +and +.Sy SHF_WRITE . +.It .debug +This section holds information for symbolic debugging. +The contents +are unspecified. +This section is of type +.Sy SHT_PROGBITS . +No attribute types are used. +.It .dtors +This section holds initialized pointers to the C++ destructor functions. +This section is of type +.Sy SHT_PROGBITS . +The attribute types are +.Sy SHF_ALLOC +and +.Sy SHF_WRITE . +.It .dynamic +This section holds dynamic linking information. +The section's attributes +will include the +.Sy SHF_ALLOC +bit. +Whether the +.Sy SHF_WRITE +bit is set is processor-specific. +This section is of type +.Sy SHT_DYNAMIC . +See the attributes above. +.It .dynstr +This section holds strings needed for dynamic linking, most commonly +the strings that represent the names associated with symbol table entries. +This section is of type +.Sy SHT_STRTAB . +The attribute type used is +.Sy SHF_ALLOC . +.It .dynsym +This section holds the dynamic linking symbol table. +This section is of type +.Sy SHT_DYNSYM . +The attribute used is +.Sy SHF_ALLOC . +.It .fini +This section holds executable instructions that contribute to the process +termination code. +When a program exits normally the system arranges to +execute the code in this section. +This section is of type +.Sy SHT_PROGBITS . +The attributes used are +.Sy SHF_ALLOC +and +.Sy SHF_EXECINSTR . +.It .got +This section holds the global offset table. +This section is of type +.Sy SHT_PROGBITS . +The attributes are processor-specific. +.It .hash +This section holds a symbol hash table. +This section is of type +.Sy SHT_HASH . +The attribute used is +.Sy SHF_ALLOC . +.It .init +This section holds executable instructions that contribute to the process +initialization code. +When a program starts to run the system arranges to +execute the code in this section before calling the main program entry point. +This section is of type +.Sy SHT_PROGBITS . +The attributes used are +.Sy SHF_ALLOC +and +.Sy SHF_EXECINSTR . +.It .interp +This section holds the pathname of a program interpreter. +If the file has +a loadable segment that includes the section, the section's attributes will +include the +.Sy SHF_ALLOC +bit. +Otherwise, that bit will be off. +This section is of type +.Sy SHT_PROGBITS . +.It .line +This section holds line number information for symbolic debugging, which +describes the correspondence between the program source and the machine code. +The contents are unspecified. +This section is of type +.Sy SHT_PROGBITS . +No attribute types are used. +.It .note +This section holds information in the +.Dq Note Section +format described below. +This section is of type +.Sy SHT_NOTE . +No attribute types are used. +.Ox +native executables usually contain a +.Sy .note.openbsd.ident +section to identify themselves, for the kernel to bypass any compatibility +ELF binary emulation tests when loading the file. +.It .plt +This section holds the procedure linkage table. +This section is of type +.Sy SHT_PROGBITS . +The attributes are processor-specific. +.It .relNAME +This section holds relocation information as described below. +If the file +has a loadable segment that includes relocation, the section's attributes +will include the +.Sy SHF_ALLOC +bit. +Otherwise the bit will be off. +By convention, +.Dq NAME +is supplied by the section to which the relocations apply. +Thus a relocation +section for +.Sy .text +normally would have the name +.Sy .rel.text . +This section is of type +.Sy SHT_REL . +.It .relaNAME +This section holds relocation information as described below. +If the file +has a loadable segment that includes relocation, the section's attributes +will include the +.Sy SHF_ALLOC +bit. +Otherwise the bit will be off. +By convention, +.Dq NAME +is supplied by the section to which the relocations apply. +Thus a relocation +section for +.Sy .text +normally would have the name +.Sy .rela.text . +This section is of type +.Sy SHT_RELA . +.It .rodata +This section holds read-only data that typically contributes to a +non-writable segment in the process image. +This section is of type +.Sy SHT_PROGBITS . +The attribute used is +.Sy SHF_ALLOC . +.It .rodata1 +This section holds read-only data that typically contributes to a +non-writable segment in the process image. +This section is of type +.Sy SHT_PROGBITS . +The attribute used is +.Sy SHF_ALLOC . +.It .shstrtab +This section holds section names. +This section is of type +.Sy SHT_STRTAB . +No attribute types are used. +.It .strtab +This section holds strings, most commonly the strings that represent the +names associated with symbol table entries. +If the file has a loadable +segment that includes the symbol string table, the section's attributes +will include the +.Sy SHF_ALLOC +bit. +Otherwise the bit will be off. +This section is of type +.Sy SHT_STRTAB . +.It .symtab +This section holds a symbol table. +If the file has a loadable segment +that includes the symbol table, the section's attributes will include +the +.Sy SHF_ALLOC +bit. +Otherwise the bit will be off. +This section is of type +.Sy SHT_SYMTAB . +.It .text +This section holds the +.Dq text , +or executable instructions, of a program. +This section is of type +.Sy SHT_PROGBITS . +The attributes used are +.Sy SHF_ALLOC +and +.Sy SHF_EXECINSTR . +.El +.Pp +String table sections hold null-terminated character sequences, commonly +called strings. +The object file uses these strings to represent symbol +and section names. +One references a string as an index into the string +table section. +The first byte, which is index zero, is defined to hold +a null character. +Similarly, a string table's last byte is defined to +hold a null character, ensuring null termination for all strings. +.Pp +An object file's symbol table holds information needed to locate and +relocate a program's symbolic definitions and references. +A symbol table +index is a subscript into this array. +.Bd -literal -offset indent +typedef struct { + uint32_t st_name; + Elf32_Addr st_value; + uint32_t st_size; + unsigned char st_info; + unsigned char st_other; + uint16_t st_shndx; +} Elf32_Sym; +.Ed +.Bd -literal -offset indent +typedef struct { + uint32_t st_name; + unsigned char st_info; + unsigned char st_other; + uint16_t st_shndx; + Elf64_Addr st_value; + uint64_t st_size; +} Elf64_Sym; +.Ed +.Bl -tag -width "st_value" +.It Dv st_name +This member holds an index into the object file's symbol string table, +which holds character representations of the symbol names. +If the value +is non-zero, it represents a string table index that gives the symbol +name. +Otherwise, the symbol table has no name. +.It Dv st_value +This member gives the value of the associated symbol. +.It Dv st_size +Many symbols have associated sizes. +This member holds zero if the symbol +has no size or an unknown size. +.It Dv st_info +This member specifies the symbol's type and binding attributes: +.Bl -tag -width "STT_SECTION" +.It Dv STT_NOTYPE +The symbol's type is not defined. +.It Dv STT_OBJECT +The symbol is associated with a data object. +.It Dv STT_FUNC +The symbol is associated with a function or other executable code. +.It Dv STT_SECTION +The symbol is associated with a section. +Symbol table entries of +this type exist primarily for relocation and normally have +.Sy STB_LOCAL +bindings. +.It Dv STT_FILE +By convention, the symbol's name gives the name of the source file +associated with the object file. +A file symbol has +.Sy STB_LOCAL +bindings, its section index is +.Sy SHN_ABS , +and it precedes the other +.Sy STB_LOCAL +symbols of the file, if it is present. +.It Dv STT_LOPROC +This value up to and including +.Sy STT_HIPROC +is reserved for processor-specific semantics. +.It Dv STT_HIPROC +This value down to and including +.Sy STT_LOPROC +is reserved for processor-specific semantics. +.El +.Bl -tag -width "STB_GLOBAL" +.It Dv STB_LOCAL +Local symbols are not visible outside the object file containing their +definition. +Local symbols of the same name may exist in multiple files +without interfering with each other. +.It Dv STB_GLOBAL +Global symbols are visible to all object files being combined. +One file's +definition of a global symbol will satisfy another file's undefined +reference to the same symbol. +.It Dv STB_WEAK +Weak symbols resemble global symbols, but their definitions have lower +precedence. +.It Dv STB_LOPROC +This value up to and including +.Sy STB_HIPROC +is reserved for processor-specific semantics. +.It Dv STB_HIPROC +This value down to and including +.Sy STB_LOPROC +is reserved for processor-specific semantics. +.Pp +There are macros for packing and unpacking the binding and type fields: +.Pp +.Bl -tag -width "ELF32_ST_INFO(bind, type)" -compact +.It Xo +.Fn ELF32_ST_BIND info +.Xc +or +.Fn ELF64_ST_BIND info +extract a binding from an st_info value. +.It Xo +.Fn ELF64_ST_TYPE info +.Xc +or +.Fn ELF32_ST_TYPE info +extract a type from an st_info value. +.It Xo +.Fn ELF32_ST_INFO bind type +.Xc +or +.Fn ELF64_ST_INFO bind type +convert a binding and a type into an st_info value. +.El +.El +.Pp +.It Dv st_other +This member currently holds zero and has no defined meaning. +.It Dv st_shndx +Every symbol table entry is +.Dq defined +in relation to some section. +This member holds the relevant section +header table index. +.El +.Pp +Relocation is the process of connecting symbolic references with +symbolic definitions. +Relocatable files must have information that +describes how to modify their section contents, thus allowing executable +and shared object files to hold the right information for a process' +program image. +Relocation entries are these data. +.Pp +Relocation structures that do not need an addend: +.Bd -literal -offset indent +typedef struct { + Elf32_Addr r_offset; + uint32_t r_info; +} Elf32_Rel; +.Ed +.Bd -literal -offset indent +typedef struct { + Elf64_Addr r_offset; + uint64_t r_info; +} Elf64_Rel; +.Ed +.Pp +Relocation structures that need an addend: +.Bd -literal -offset indent +typedef struct { + Elf32_Addr r_offset; + uint32_t r_info; + int32_t r_addend; +} Elf32_Rela; +.Ed +.Bd -literal -offset indent +typedef struct { + Elf64_Addr r_offset; + uint64_t r_info; + int64_t r_addend; +} Elf64_Rela; +.Ed +.Bl -tag -width "r_offset" +.It Dv r_offset +This member gives the location at which to apply the relocation action. +For a relocatable file, the value is the byte offset from the beginning +of the section to the storage unit affected by the relocation. +For an +executable file or shared object, the value is the virtual address of +the storage unit affected by the relocation. +.It Dv r_info +This member gives both the symbol table index with respect to which the +relocation must be made and the type of relocation to apply. +Relocation +types are processor-specific. +When the text refers to a relocation +entry's relocation type or symbol table index, it means the result of +applying +.Sy ELF_[32|64]_R_TYPE +or +.Sy ELF[32|64]_R_SYM , +respectively, to the entry's +.Sy r_info +member. +.It Dv r_addend +This member specifies a constant addend used to compute the value to be +stored into the relocatable field. +.El +.Sh SEE ALSO +.Xr as 1 , +.Xr gdb 1 , +.Xr ld 1 , +.Xr objdump 1 , +.Xr execve 2 , +.Xr core 5 +.Rs +.%A Hewlett-Packard +.%B Elf-64 Object File Format +.Re +.Rs +.%A Santa Cruz Operation +.%B System V Application Binary Interface +.Re +.Rs +.%A Unix System Laboratories +.%T Object Files +.%B "Executable and Linking Format (ELF)" +.Re +.Sh HISTORY +.Ox +ELF support first appeared in +.Ox 1.2 , +although not all supported platforms use it as the native +binary file format. +ELF in itself first appeared in +.At V . +The ELF format is an adopted standard. +.Sh AUTHORS +The original version of this manual page was written by +.An Jeroen Ruigrok van der Werven +.Aq asmodai@FreeBSD.org +with inspiration from BSDi's +.Bsx +.Nm elf +manpage. diff --git a/man5/environ.5 b/man5/environ.5 new file mode 100644 index 000000000..326e5cc11 --- /dev/null +++ b/man5/environ.5 @@ -0,0 +1,221 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), +.\" Fri Apr 2 11:32:09 MET DST 1993 +.\" and Andries Brouwer (aeb@cwi.nl), Fri Feb 14 21:47:50 1997. +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified Sun Jul 25 10:45:30 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Sun Jul 21 21:25:26 1996 by Andries Brouwer (aeb@cwi.nl) +.\" Modified Mon Oct 21 17:47:19 1996 by Eric S. Raymond (esr@thyrsus.com) +.\" Modified Wed Aug 27 20:28:58 1997 by Nicolás Lichtmaier (nick@debian.org) +.\" Modified Mon Sep 21 00:00:26 1998 by Andries Brouwer (aeb@cwi.nl) +.\" Modified Wed Jan 24 06:37:24 2001 by Eric S. Raymond (esr@thyrsus.com) +.\" Modified Thu Dec 13 23:53:27 2001 by Martin Schulze <joey@infodrom.org> +.\" +.TH ENVIRON 5 2001-12-14 "Linux" "Linux Programmer's Manual" +.SH NAME +environ \- user environment +.SH SYNOPSIS +.ad l +.nf +.B extern char **environ; +.br +.fi +.ad b +.SH DESCRIPTION +The variable +.I environ +points to an array of strings called the `environment'. +(This variable must be declared in the user program, +but is declared in the header file +.I unistd.h +in case the header files came from libc4 or libc5, and +in case they came from glibc and +.B _GNU_SOURCE +was defined.) +This array of strings is made available to the process by the +.BR exec (3) +call that started the process. By convention these strings +have the form `\fIname\fP\fB=\fP\fIvalue\fP'. Common examples are: +.TP +.B USER +The name of the logged-in user (used by some BSD-derived programs). +.TP +.B LOGNAME +The name of the logged-in user (used by some System-V derived programs). +.TP +.B HOME +A user's login directory, set by +.BR login (1) +from the password file +.BR passwd (5). +.TP +.B LANG +The name of a locale to use for locale categories when not overridden +by \fBLC_ALL\fP or more specific environment variables like +\fBLC_COLLATE\fP, \fBLC_CTYPE\fP, \fBLC_MESSAGES\fP, \fBLC_MONETARY\fP, +\fBLC_NUMERIC\fP, \fBLC_TIME\fP, cf. +.BR locale (5). +.TP +.B PATH +The sequence of directory prefixes that \fBsh\fP(1) and many other +programs apply in searching for a file known by an incomplete path name. +The prefixes are separated by `\fB:\fP'. +(Similarly one has \fBCDPATH\fP used by some shells to find the target +of a change directory command, \fBMANPATH\fP used by \fBman\fP(1) to +find manual pages, etc.) +.TP +.B PWD +The current working directory. Set by some shells. +.TP +.B SHELL +The file name of the user's login shell. +.TP +.B TERM +The terminal type for which output is to be prepared. +.TP +.B PAGER +The user's preferred utility to display text files. +.TP +.BR EDITOR / VISUAL +The user's preferred utility to edit text files. +.TP +.B BROWSER +The user's preferred utility to browse URLs. Sequence of colon-separated +browser commands. See http://www.catb.org/~esr/BROWSER/ . +.PP +Further names may be placed in the environment by the \fBexport\fP +command and `name=value' in +.BR sh (1), +or by the \fBsetenv\fP command if you use +.BR csh (1). +Arguments may also be placed in the +environment at the point of an +.BR exec (3). +A C program can manipulate its environment using the functions +.BR getenv (3), +.BR putenv (3), +.BR setenv (3), +and +.BR unsetenv (3). + +Note that the behaviour of many programs and library routines is +influenced by the presence or value of certain environment variables. +A random collection: +.LP +The variables +.BR LANG ", " LANGUAGE ", " NLSPATH ", " LOCPATH ", " LC_ALL ", " LC_MESSAGES ", " +etc. influence locale handling, cf. +.BR locale (5). +.LP +.B TMPDIR +influences the path prefix of names created by +\fBtmpnam(3)\fP and other routines, the temporary directory used by +\fBsort\fP(1) and other programs, etc. +.LP +.BR LD_LIBRARY_PATH ", " LD_PRELOAD +and other LD_* variables influence +the behaviour of the dynamic loader/linker. +.LP +.B POSIXLY_CORRECT +makes certain programs and library routines follow +the prescriptions of POSIX. +.LP +The behaviour of \fBmalloc\fP(3) is influenced by MALLOC_* variables. +.LP +The variable +.B HOSTALIASES +gives the name of a file containing aliases +to be used with \fBgethostbyname\fP(3). +.LP +.BR TZ " and " TZDIR +give time zone information used by +.BR tzset (3) +and through that by functions like +.IR ctime (), +.IR localtime (), +.IR mktime (), +.IR strftime (). +See also +.BR tzselect (1). +.LP +.B TERMCAP +gives information on how to address a given terminal +(or gives the name of a file containing such information). +.LP +.BR COLUMNS " and " LINES +tell applications about the window size, possibly overriding the actual size. +.LP +.BR PRINTER " or " LPDEST +may specify the desired printer to use. See +.BR lpr (1). +.LP +Etc. +.SH BUGS +Clearly there is a security risk here. Many a system command has been +tricked into mischief by a user who specified unusual values for +.BR IFS " or " LD_LIBRARY_PATH . + +There is also the risk of name space pollution. +Programs like +.I make +and +.I autoconf +allow overriding of default utility names from the +environment with similarly named variables in all caps. +Thus one uses +.B CC +to select the desired C compiler (and similarly +.BR MAKE , +.BR AR , +.BR AS , +.BR FC , +.BR LD , +.BR LEX , +.BR RM , +.BR YACC , +etc.). +However, in some traditional uses such an environment variable +gives options for the program instead of a pathname. +Thus, one has +.BR MORE , +.BR LESS , +and +.BR GZIP . +Such usage is considered mistaken, and to be avoided in new +programs. The authors of +.I gzip +should consider renaming their option to +.BR GZIP_OPT . +.SH "SEE ALSO" +.BR bash (1), +.BR csh (1), +.BR login (1), +.BR sh (1), +.BR tcsh (1), +.BR execve (2), +.BR clearenv (3), +.BR exec (3), +.BR getenv (3), +.BR putenv (3), +.BR setenv (3), +.BR unsetenv (3), +.BR locale (5) diff --git a/man5/fs.5 b/man5/fs.5 new file mode 100644 index 000000000..6e96517ae --- /dev/null +++ b/man5/fs.5 @@ -0,0 +1,162 @@ +.\" Copyright 1996 Daniel Quinlan (Daniel.Quinlan@linux.org) +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.TH FILESYSTEMS 5 2001-12-07 "" "Linux Programmer's Manual" +.nh +.SH NAME +filesystems \- Linux filesystem types: minix, ext, ext2, ext3, xia, msdos, +umsdos, vfat, proc, nfs, iso9660, hpfs, sysv, smb, ncpfs +.SH DESCRIPTION +When, as is customary, the +.B proc +filesystem is mounted on +.IR /proc , +you can find in the file +.I /proc/filesystems +which filesystems your kernel currently supports. +If you need a currently unsupported one, insert the corresponding +module or recompile the kernel. + +In order to use a filesystem, you have to +.I mount +it, see +.BR mount (8) +for the mount command, and for the available mount options. + +Below a short description of a few of the available filesystems. + +.TP +.B "minix" +is 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, etc. +It remains useful for floppies and RAM disks. +.TP +.B ext +is an elaborate extension of the +.B minix +filesystem. It has been completely superseded by the second version +of the extended filesystem +.RB ( ext2 ) +and has been removed from the kernel (in 2.1.21). +.TP +.B ext2 +is 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 file system +.RB ( ext ). +.B ext2 +offers the best performance (in terms of speed and CPU usage) of +the filesystems supported under Linux. +.TP +.B ext3 +is a journaling version of the ext2 filesystem. It is easy to +switch back and forth between ext2 and ext3. +.TP +.B xiafs +was 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 +.B xia +filesystem is no longer actively developed or maintained. +It was removed from the kernel in 2.1.21. +.TP +.B msdos +is the filesystem used by DOS, Windows, and some OS/2 computers. +.B msdos +filenames can be no longer than 8 characters, followed by an +optional period and 3 character extension. +.TP +.B umsdos +is an extended DOS filesystem used by Linux. It adds capability for +long filenames, UID/GID, POSIX permissions, and special files +(devices, named pipes, etc.) under the DOS filesystem, without +sacrificing compatibility with DOS. +.TP +.B vfat +is an extended DOS filesystem used by Microsoft Windows95 and Windows NT. +VFAT adds the capability to use long filenames under the MSDOS filesystem. +.TP +.B proc +is a pseudo-filesystem which is used as an interface to kernel data +structures rather than reading and interpreting +.IR /dev/kmem . +In particular, its files do not take disk space. See proc(5). +.TP +.B iso9660 +is a CD-ROM filesystem type conforming to the ISO 9660 standard. +.RS +.TP +.B "High Sierra" +Linux supports High Sierra, the precursor to the ISO 9660 standard for +CD-ROM filesystems. It is automatically recognized within the +.B iso9660 +filesystem support under Linux. +.TP +.B "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 +.B iso9660 +filesystem to a UNIX host, and provide information such as long +filenames, UID/GID, POSIX permissions, and devices. It is +automatically recognized within the +.B iso9660 +filesystem support under Linux. +.RE +.TP +.B hpfs +is the High Performance Filesystem, used in OS/2. This filesystem is +read-only under Linux due to the lack of available documentation. +.TP +.B sysv +is an implementation of the SystemV/Coherent filesystem for Linux. It +implements all of Xenix FS, SystemV/386 FS, and Coherent FS. +.TP +.B nfs +is the network filesystem used to access disks located on remote computers. +.TP +.B smb +is a network filesystem that supports the SMB protocol, used by +Windows for Workgroups, Windows NT, and Lan Manager. +.sp +To use +.B smb +fs, you need a special mount program, which can be found in the ksmbfs +package, found at +.IR ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/smbfs . +.TP +.B ncpfs +is a network filesystem that supports the NCP protocol, used by +Novell NetWare. +.sp +To use +.BR ncpfs , +you need special programs, which can be found at +.IR ftp://linux01.gwdg.de/pub/ncpfs . +.SH "SEE ALSO" +.BR proc (5), +.BR fsck (8), +.BR mkfs (8), +.BR mount (8) diff --git a/man5/ftpusers.5 b/man5/ftpusers.5 new file mode 100644 index 000000000..9b429c756 --- /dev/null +++ b/man5/ftpusers.5 @@ -0,0 +1,46 @@ +.\" Copyright (c) 2000 Christoph J. Thompson <obituary@linuxbe.org> +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.TH FTPUSERS 5 2000-08-27 "File formats" "Linux Programmer's Manual" +.SH NAME +ftpusers \- list of users that may not log in via the FTP daemon +.SH DESCRIPTION +The text file +.B ftpusers +contains a list of users that may not log in using the +File Transfer Protocol (FTP) server daemon. This file is used not merely for +system administration purposes but for improving security within a TCP/IP +networked environment. It will typically contain a list of the users that +either have no business using ftp or have too many privileges to be allowed +to log in through the FTP server daemon. +Such users usually include root, daemon, bin, uucp, and news. +If your FTP server daemon doesn't use +.B ftpusers +then it is suggested that you read its documentation to find out how to +block access for certain users. Washington University FTP server Daemon +(wuftpd) and Professional FTP Daemon (proftpd) are known to make use of +.BR ftpusers . +.SH FORMAT +The format of +.B ftpusers +is very simple. There is one account name (or user name) per line. +Lines starting with a # are ignored. +.SH FILES +.I /etc/ftpusers +.SH "SEE ALSO" +.BR passwd (5), +.BR proftpd (8), +.BR wuftpd (8) diff --git a/man5/group.5 b/man5/group.5 new file mode 100644 index 000000000..1356ddb12 --- /dev/null +++ b/man5/group.5 @@ -0,0 +1,54 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993 +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified Sat Jul 24 17:06:03 1993 by Rik Faith (faith@cs.unc.edu) +.TH GROUP 5 1992-12-29 "Linux" "Linux Programmer's Manual" +.SH NAME +group \- user group file +.SH DESCRIPTION +\fB/etc/group\fP is an ASCII file which defines the groups to which users +belong. There is one entry per line, and each line has the format: +.sp +.RS +group_name:passwd:GID:user_list +.RE +.sp +The field descriptions are: +.IP group_name +the name of the group. +.IP password +the (encrypted) group password. If this field is +empty, no password is needed. +.IP GID +the numerical group ID. +.IP user_list +all the group member's user names, separated by commas. +.SH BUGS +As the 4.2BSD +.BR initgroups (3) +man page says: Noone seems to keep /etc/group up-to-date. +.SH FILES +/etc/group +.SH "SEE ALSO" +.BR login (1), +.BR newgrp (1), +.BR passwd (5) diff --git a/man5/host.conf.5 b/man5/host.conf.5 new file mode 100644 index 000000000..5bf1d6a03 --- /dev/null +++ b/man5/host.conf.5 @@ -0,0 +1,192 @@ +.\" Copyright (c) 1997 Martin Schulze (joey@infodrom.north.de) +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +.\" USA. +.\" +.\" Much of the text is copied from the manpage of resolv+(8). +.\" +.\" 2003-08-23 Martin Schulze <joey@infodrom.org> Updated according to glibc 2.3.2 +.TH HOST.CONF 5 2003-08-23 "Debian GNU/Linux" "Linux System Administration" +.SH NAME +host.conf \- resolver configuration file +.SH DESCRIPTION +The file +.I /etc/host.conf +contains configuration information specific to the resolver library. +It should contain one configuration keyword per line, followed by +appropriate configuration information. The keywords recognized are +.IR order ", " trim ", " multi ", " nospoof ", " spoof ", and " reorder . +These keywords are described below. + +.TP +.I order +This keyword specifies how host lookups are to be performed. It +should be followed by one or more lookup methods, separated by commas. +Valid methods are +.IR bind ", " hosts ", and " nis . +.TP +.I trim +This keyword may be listed more than once. Each time it should be +followed by a list of domains, separated by colons (`:'), semicolons +(`;') or commas (`,'), with the leading dot. When set, the +resolv+ library will automatically trim the given domain name from the +end of any hostname resolved via DNS. This is intended for use with +local hosts and domains. (Related note: trim will not affect hostnames +gathered via NIS or the hosts file. Care should be taken to +ensure that the first hostname for each entry in the hosts file is +fully qualified or non-qualified, as appropriate for the local +installation.) +.TP +.I multi +Valid values are +.IR on " and " off . +If set to +.IR on , +the resolv+ library will return all valid addresses for a host that +appears in the +.I /etc/hosts +file, +instead of only the first. This is +.I off +by default, as it may cause a substantial performance loss at sites +with large hosts files. +.TP +.I nospoof +Valid values are +.IR on " and " off . +If set to +.IR on , +the resolv+ library will attempt to prevent hostname spoofing to +enhance the security of +.BR rlogin " and " rsh . +It works as follows: after performing a host address lookup, resolv+ +will perform a hostname lookup for that address. If the two hostnames +do not match, the query will fail. +The default value is +.IR off . +.TP +.I spoofalert +Valid values are +.IR on " and " off . +If this option is set to +.I on +and the +.I nospoof +option is also set, resolv+ will log a warning of the error via the +syslog facility. The default value is +.IR off . +.TP +.I spoof +Valid values are +.IR off ", " nowarn " and " warn . +If this option is set to +.IR off , +spoofed addresses are permitted and no warnings will be emitted +via the syslog facility. +If this option is set to +.IR warn , +resolv+ will attempt to prevent hostname spoofing to +enhance the security and log a warning of the error via the syslog +facility. +If this option is set to +.IR nowarn , +the resolv+ library will attempt to prevent hostname spoofing to +enhance the security but not emit warnings via the syslog facility. +Setting this option to anything else is equal to setting it to +.IR nowarn . +.TP +.I reorder +Valid values are +.IR on " and " off . +If set to +.IR on , +resolv+ will attempt to reorder host addresses so that local addresses +(i.e., on the same subnet) are listed first when a +.BR gethostbyname (3) +is performed. Reordering is done for all lookup methods. The default +value is +.IR off . +.SH ENVIRONMENT +There are six environment variables that can be used to allow users to +override the behavior which is configured in +.IR /etc/host.conf . +.TP +.B RESOLV_HOST_CONF +If set this variable points to a file that should be read instead of +.IR /etc/host.conf . +.TP +.B RESOLV_SERV_ORDER +Overrides the +.I order +command. +.TP +.B RESOLV_SPOOF_CHECK +Overrides the +.IR nospoof ", " spoofalert " and " spoof +commands in the same way as the +.I spoof +command is parsed. Valid values are +.IR off ", " nowarn " and " warn . +.TP +.B RESOLV_MULTI +Overrides the +.I multi +command. +.TP +.B RESOLV_REORDER +Overrides the +.I reorder +command. +.TP +.B RESOLV_ADD_TRIM_DOMAINS +A list of domains, separated by colons (`:'), semicolons (`;') or +commas (`,'), with the leading dot, which will be added to the list of +domains that should be trimmed. +.TP +.B RESOLV_OVERRIDE_TRIM_DOMAINS +A list of domains, separated by colons (`:'), semicolons (`;') or +commas (`,'), with the leading dot, which will replace the list of +domains that should be trimmed. Overrides the +.I trim +command. +.SH FILES +.TP +.I /etc/host.conf +Resolver configuration file +.TP +.I /etc/resolv.conf +Resolver configuration file +.TP +.I /etc/hosts +Local hosts database +.SH NOTES +The following differences exist compared to the original implementation. +A new command +.I spoof +and a new environment variable +.B RESOLV_SPOOF_CHECK +can take arguments like +.IR off ", " nowarn " and " warn . +Line comments can appear anywhere and not only at the beginning of a line. +.SH "SEE ALSO" +.BR gethostbyname (3), +.BR hostname (7), +.BR named (8), +.BR resolv+ (8) diff --git a/man5/hosts.5 b/man5/hosts.5 new file mode 100644 index 000000000..334fee197 --- /dev/null +++ b/man5/hosts.5 @@ -0,0 +1,107 @@ +.\" Hey, Emacs! This is an -*- nroff -*- source file. +.\" Copyright (c) 2000 Manoj Srivastava <srivasta@debian.org> +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, +.\" USA. +.\" +.\" Minor polishing, aeb +.\" Modified, 2002-06-16, Mike Coleman +.\" +.TH HOSTS 5 2002-06-16 "Debian" "Linux Programmer's Manual" +.SH NAME +hosts \- The static table lookup for host names +.SH SYNOPSIS +.B /etc/hosts +.SH DESCRIPTION +This manual page describes the format of the +.I /etc/hosts +file. This file is a simple text file that associates IP addresses +with hostnames, one line per IP address. For each host a single +line should be present with the following information: +.RS +.PP +IP_address canonical_hostname aliases +.RE +.PP +Fields of the entry are separated by any number of blanks and/or +tab characters. Text from a "#" character until the end of the line is +a comment, and is ignored. Host names may contain only alphanumeric +characters, minus signs ("-"), and periods ("."). They must begin with an +alphabetic character and end with an alphanumeric character. +Aliases provide for name changes, alternate spellings, +shorter hostnames, or generic hostnames (for example, +.IR localhost ). +The format of the host table is described in RFC 952. +.PP +The Berkeley Internet Name Domain (BIND) Server implements the +Internet name server for UNIX systems. It augments or replaces the +.I /etc/hosts +file or host name lookup, and frees a host from relying on +.I /etc/hosts +being up to date and complete. +.PP +In modern systems, even though the host table has been superseded by +DNS, it is still widely used for: +.TP +.B bootstrapping +Most systems have a small host table containing the name and address +information for important hosts on the local network. This is useful +when DNS is not running, for example during system bootup. +.TP +.B NIS +Sites that use NIS use the host table as input to the NIS host +database. Even though NIS can be used with DNS, most NIS sites still +use the host table with an entry for all local hosts as a backup. +.TP +.B isolated nodes +Very small sites that are isolated from the network use the host table +instead of DNS. If the local information rarely changes, and the +network is not connected to the Internet, DNS offers little +advantage. +.SH EXAMPLE +.nf + 127.0.0.1 localhost + 192.168.1.10 foo.mydomain.org foo + 192.168.1.13 bar.mydomain.org bar + 216.234.231.5 master.debian.org master + 205.230.163.103 www.opensource.org +.fi +.SH "HISTORICAL NOTE" +Before the advent of DNS, the host table was the only way of resolving +hostnames on the fledgling Internet. Indeed, this file could be +created from the official host data base maintained at the Network +Information Control Center (NIC), though local changes were often +required to bring it up to date regarding unofficial aliases and/or +unknown hosts. The NIC no longer maintains the hosts.txt files, +though looking around at the time of writing (circa 2000), there are +historical hosts.txt files on the WWW. I just found three, from 92, +94, and 95. +.SH FILES +.I /etc/hosts +.SH "SEE ALSO" +.BR hostname (1), +.BR resolver (3), +.BR resolver (5), +.BR hostname (7), +.BR named (8), +Internet RFC 952 +.SH AUTHOR +This manual page was written by Manoj Srivastava <srivasta@debian.org>, +for the Debian GNU/Linux system. diff --git a/man5/hosts.equiv.5 b/man5/hosts.equiv.5 new file mode 100644 index 000000000..cbc0eb3e0 --- /dev/null +++ b/man5/hosts.equiv.5 @@ -0,0 +1,56 @@ +.\" Copyright (c) 1995 Peter Tobias <tobias@et-inf.fho-emden.de> +.\" This file may be distributed under the GNU General Public License. +.TH HOSTS.EQUIV 5 2003-08-24 "Linux" "Linux Programmer's Manual" +.SH NAME +/etc/hosts.equiv \- list of hosts and users that are granted "trusted" +\fBr\fP command access to your system +.SH DESCRIPTION +The \fBhosts.equiv\fP file allows or denies hosts and users to use +the \fBr\fP-commands (e.g. \fBrlogin\fP, \fBrsh\fP or \fBrcp\fP) without +supplying a password. +.PP +The file uses the following format: +.TP +\fI[ + | - ]\fP \fI[hostname]\fP \fI[username]\fP +.PP +The \fIhostname\fP is the name of a host which is logically equivalent +to the local host. Users logged into that host are allowed to access +like-named user accounts on the local host without supplying a password. +The \fIhostname\fP may be (optionally) preceded by a plus (+) sign. +If the plus sign is used alone it allows any host to access your system. +You can expicitly deny access to a host by preceding the \fIhostname\fP +by a minus (-) sign. Users from that host must always supply a password. +For security reasons you should always use the FQDN of the hostname and +not the short hostname. +.PP +The \fIusername\fP entry grants a specific user access to all user +accounts (except root) without supplying a password. That means the +user is NOT restricted to like-named accounts. The \fIusername\fP may +be (optionally) preceded by a plus (+) sign. You can also explicitly +deny access to a specific user by preceding the \fIusername\fP with +a minus (-) sign. This says that the user is not trusted no matter +what other entries for that host exist. +.PP +Netgroups can be specified by preceding the netgroup by an @ sign. +.PP +Be extremely careful when using the plus (+) sign. A simple typographical +error could result in a standalone plus sign. A standalone plus sign is +a wildcard character that means "any host"! +.SH FILES +.I /etc/hosts.equiv +.SH NOTES +Some systems will only honor the contents of this file when it has owner +root and no write permission for anybody else. Some exceptionally +paranoid systems even require that there be no other hard links to the file. +.PP +Modern systems use the Pluggable Authentication Modules library (PAM). +With PAM a standalone plus sign is only considered a wildcard +character which means "any host" when the word +.I promiscuous +is added to the auth component line in your PAM file for +the particular service +.RB "(e.g. " rlogin ). +.SH "SEE ALSO" +.BR rhosts (5), +.BR rlogind (8), +.BR rshd (8) diff --git a/man5/intro.5 b/man5/intro.5 new file mode 100644 index 000000000..792e4af0a --- /dev/null +++ b/man5/intro.5 @@ -0,0 +1,33 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993 +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified Sat Jul 24 17:06:52 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Sun Jan 14 00:34:09 1996 by Andries Brouwer (aeb@cwi.nl) +.TH INTRO 5 1993-07-24 "Linux" "Linux Programmer's Manual" +.SH NAME +intro \- Introduction to file formats +.SH DESCRIPTION +This chapter describes various file formats and protocols, +and the used C structures, if any. +.SH AUTHORS +Look at the header of the manual page for the author(s) and copyright +conditions. Note that these can be different from page to page! diff --git a/man5/ipc.5 b/man5/ipc.5 new file mode 100644 index 000000000..b7c1051cd --- /dev/null +++ b/man5/ipc.5 @@ -0,0 +1,383 @@ +.\" Copyright 1993 Giorgio Ciucci (giorgio@crcc.it) +.\" +.\" 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. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" +.TH IPC 5 1993-11-01 "Linux 0.99.13" "Linux Programmer's Manual" +.SH NAME +ipc \- System V interprocess communication mechanisms +.SH SYNOPSIS +.nf +.B +# include <sys/types.h> +.B +# include <sys/ipc.h> +.B +# include <sys/msg.h> +.B +# include <sys/sem.h> +.B +# include <sys/shm.h> +.SH DESCRIPTION +This 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 +.B resource +means an instantiation of one among such mechanisms. +.SS Resource Access Permissions +For each resource, the system uses a common structure of type +.BR "struct ipc_perm" +to store information needed in determining permissions to perform an +ipc operation. +The +.B ipc_perm +structure, defined by the +.I <sys/ipc.h> +system header file, includes the following members: +.sp +.B + ushort cuid; +/* creator user id */ +.br +.B + ushort cgid; +/* creator group id */ +.br +.B + ushort uid; +/* owner user id */ +.br +.B + ushort gid; +/* owner group id */ +.br +.B + ushort mode; +/* r/w permissions */ +.PP +The +.B mode +member of the +.B ipc_perm +structure defines, with its lower 9 bits, the access permissions to the +resource for a process executing an ipc system call. +The permissions are interpreted as follows: +.sp +.nf + 0400 Read by user. + 0200 Write by user. +.sp .5 + 0040 Read by group. + 0020 Write by group. +.sp .5 + 0004 Read by others. + 0002 Write by others. +.fi +.PP +Bits 0100, 0010, and 0001 (the execute bits) are unused by the system. +Furthermore, +"write" +effectively means +"alter" +for a semaphore set. +.PP +The same system header file also defines the following symbolic +constants: +.TP 14 +.B IPC_CREAT +Create entry if key doesn't exist. +.TP +.B IPC_EXCL +Fail if key exists. +.TP +.B IPC_NOWAIT +Error if request must wait. +.TP +.B IPC_PRIVATE +Private key. +.TP +.B IPC_RMID +Remove resource. +.TP +.B IPC_SET +Set resource options. +.TP +.B IPC_STAT +Get resource options. +.PP +Note that +.B IPC_PRIVATE +is a +.B key_t +type, while all the other symbolic constants are flag fields and can +be OR'ed into an +.B int +type variable. +.SS Message Queues +A message queue is uniquely identified by a positive integer +.RI "(its " msqid ) +and has an associated data structure of type +.BR "struct msqid_ds" , +defined in +.IR <sys/msg.h> , +containing the following members: +.sp +.B + struct ipc_perm msg_perm; +.br +.B + ushort msg_qnum; +/* no of messages on queue */ +.br +.B + ushort msg_qbytes; +/* bytes max on a queue */ +.br +.B + ushort msg_lspid; +/* pid of last msgsnd call */ +.br +.B + ushort msg_lrpid; +/* pid of last msgrcv call */ +.br +.B + time_t msg_stime; +/* last msgsnd time */ +.br +.B + time_t msg_rtime; +/* last msgrcv time */ +.br +.B + time_t msg_ctime; +/* last change time */ +.TP 11 +.B msg_perm +.B ipc_perm +structure that specifies the access permissions on the message +queue. +.TP +.B msg_qnum +Number of messages currently on the message queue. +.TP +.B msg_qbytes +Maximum number of bytes of message text allowed on the message +queue. +.TP +.B msg_lspid +ID of the process that performed the last +.B msgsnd +system call. +.TP +.B msg_lrpid +ID of the process that performed the last +.B msgrcv +system call. +.TP +.B msg_stime +Time of the last +.B msgsnd +system call. +.TP +.B msg_rtime +Time of the last +.B msgcv +system call. +.TP +.B msg_ctime +Time of the last +system call that changed a member of the +.B msqid_ds +structure. +.SS Semaphore Sets +A semaphore set is uniquely identified by a positive integer +.RI "(its " semid ) +and has an associated data structure of type +.BR "struct semid_ds" , +defined in +.IR <sys/sem.h> , +containing the following members: +.sp +.B + struct ipc_perm sem_perm; +.br +.B + time_t sem_otime; +/* last operation time */ +.br +.B + time_t sem_ctime; +/* last change time */ +.br +.B + ushort sem_nsems; +/* count of sems in set */ +.TP 11 +.B sem_perm +.B ipc_perm +structure that specifies the access permissions on the semaphore +set. +.TP +.B sem_otime +Time of last +.B semop +system call. +.TP +.B sem_ctime +Time of last +.B semctl +system call that changed a member of the above structure or of one +semaphore belonging to the set. +.TP +.B sem_nsems +Number of semaphores in the set. +Each semaphore of the set is referenced by a non-negative integer +ranging from +.B 0 +to +.BR sem_nsems\-1 . +.PP +A semaphore is a data structure of type +.B "struct sem" +containing the following members: +.sp +.B + ushort semval; +/* semaphore value */ +.br +.B + short sempid; +/* pid for last operation */ +.br +.B + ushort semncnt; +/* nr awaiting semval to increase */ +.br +.B + ushort semzcnt; +/* nr awaiting semval = 0 */ +.TP 11 +.B semval +Semaphore value: a non-negative integer. +.TP +.B sempid +ID of the last process that performed a semaphore operation +on this semaphore. +.TP +.B semncnt +Number of processes suspended awaiting for +.B semval +to increase. +.TP +.B semznt +Number of processes suspended awaiting for +.B semval +to become zero. +.SS Shared Memory Segments +A shared memory segment is uniquely identified by a positive integer +.RI "(its " shmid ) +and has an associated data structure of type +.BR "struct shmid_ds" , +defined in +.IR <sys/shm.h> , +containing the following members: +.sp +.B + struct ipc_perm shm_perm; +.br +.B + int shm_segsz; +/* size of segment */ +.br +.B + ushort shm_cpid; +/* pid of creator */ +.br +.B + ushort shm_lpid; +/* pid, last operation */ +.br +.B + short shm_nattch; +/* no. of current attaches */ +.br +.B + time_t shm_atime; +/* time of last attach */ +.br +.B + time_t shm_dtime; +/* time of last detach */ +.br +.B + time_t shm_ctime; +/* time of last change */ +.TP 11 +.B shm_perm +.B ipc_perm +structure that specifies the access permissions on the shared memory +segment. +.TP +.B shm_segsz +Size in bytes of the shared memory segment. +.TP +.B shm_cpid +ID of the process that created the shared memory segment. +.TP +.B shm_lpid +ID of the last process that executed a +.B shmat +or +.B shmdt +system call. +.TP +.B shm_nattch +Number of current alive attaches for this shared memory segment. +.TP +.B shm_atime +Time of the last +.B shmat +system call. +.TP +.B shm_dtime +Time of the last +.B shmdt +system call. +.TP +.B shm_ctime +Time of the last +.B shmctl +system call that changed +.BR shmid_ds . +.SH "SEE ALSO" +.BR msgctl (2), +.BR msgget (2), +.BR msgrcv (2), +.BR msgsnd (2), +.BR semctl (2), +.BR semget (2), +.BR semop (2), +.BR shmat (2), +.BR shmctl (2), +.BR shmdt (2), +.BR shmget (2), +.BR ftok (3) diff --git a/man5/issue.5 b/man5/issue.5 new file mode 100644 index 000000000..27ca843a5 --- /dev/null +++ b/man5/issue.5 @@ -0,0 +1,38 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993 +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified Sun Jul 25 11:06:22 1993 by Rik Faith <faith@cs.unc.edu> +.\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond <esr@thyrsus.com> +.TH ISSUE 5 1993-07-24 "Linux" "Linux Programmer's Manual" +.SH NAME +issue \- pre-login message and identification file +.SH DESCRIPTION +The file \fB/etc/issue\fP is a text file which contains a message or +system identification to be printed before the login prompt. It may +contain various \fB@\fP\fIchar\fP and \fB\e\fP\fIchar\fP sequences, if +supported by +.BR getty (1). +.SH FILES +/etc/issue +.SH "SEE ALSO" +.BR getty (1), +.BR motd (5) diff --git a/man5/locale.5 b/man5/locale.5 new file mode 100644 index 000000000..836663af2 --- /dev/null +++ b/man5/locale.5 @@ -0,0 +1,576 @@ +.\" Hey Emacs, this is -*- nroff -*- +.\" +.\" This file is part of locale(1) which displays the settings of the +.\" current locale. +.\" Copyright (C) 1994 Jochen Hein (Hein@Student.TU-Clausthal.de) +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software +.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. +.\" +.TH LOCALE 5 1994-11-09 "National Language Support" "Linux User Manual" +.SH NAME +locale \- Describes a locale definition file +.SH DESCRIPTION +The +.B locale +definition files contains all the information that the +.BR localedef (1) +command needs to convert it into the binary locale database. + +The definition files consist of sections which each describe a +locale category in detail. +.SH SYNTAX +The locale definition file starts with a header that may consist +of the following keywords: +.TP +.I <escape_char> +is followed by a character that should be used as the +escape-character for the rest of the file to mark characters that +should be interpreted in a special way. It defaults to +the backslash ( +.B \\\\ +). +.TP +.I <comment_char> +is followed by a character that will be used as the +comment-character for the rest of the file. It defaults to the +number sign (#). + +.PP +The locale definition has one part for each locale category. +Each part can be copied from another existing locale or +can be defined from scratch. If the category should be copied, +the only valid keyword in the definition is +.B copy +followed by the name of the locale which should be copied. + +.SS LC_CTYPE +The definition for the +.B LC_CTYPE +category starts with the string +.I LC_CTYPE +in the first column. + +There are the following keywords allowed: + +.TP +.I upper +followed by a list of uppercase letters. The letters +.B A +trough +.B Z +are included automatically. Characters also specified as +.BR cntrl , +.BR digit , +.BR punct , +or +.B space +are not allowed. + +.TP +.I lower +followed by a list of lowercase letters. The letters +.B a +trough +.B z +are included automatically. Characters also specified as +.BR cntrl , +.BR digit , +.BR punct , +or +.B space +are not allowed. + +.TP +.I alpha +followed by a list of letters. All character specified as either +.B upper +or +.B lower +are automatically included. Characters also specified as +.BR cntrl , +.BR digit , +.BR punct , +or +.B space +are not allowed. + +.TP +.I digit +followed by the characters classified as numeric digits. Only the +digits +.B 0 +trough +.B 9 +are allowed. They are included by default in this class. + +.TP +.I space +followed by a list of characters defined as white-space +characters. Characters also specified as +.BR upper , +.BR lower , +.BR alpha , +.BR digit , +.BR graph , +or +.B xdigit +are not allowed. The characters +.BR <space> , +.BR <form-feed> , +.BR <newline> , +.BR <carriage-return> , +.BR <tab> , +and +.B <vertical-tab> +are automatically included. + +.TP +.I cntrl +followed by a list of control characters. +Characters also specified as +.BR upper , +.BR lower , +.BR alpha , +.BR digit , +.BR punct , +.BR graph , +.BR print , +or +.B xdigit +are not allowed. +.TP +.I punct +followed by a list of punctuation characters. Characters also +specified as +.BR upper , +.BR lower , +.BR alpha , +.BR digit , +.BR cntrl , +.BR xdigit , +or the +.B <space> +character are not allowed. + +.TP +.I graph +followed by a list of printable characters, not including the +.B <space> +character. The characters defined as +.BR upper , +.BR lower , +.BR alpha , +.BR digit , +.BR xdigit , +and +.B punct +are automatically included. +Characters also specified as +.B cntrl +are not allowed. + +.TP +.I print +followed by a list of printable characters, including the +.B <space> +character. The characters defined as +.BR upper , +.BR lower , +.BR alpha , +.BR digit , +.BR xdigit , +.BR punct , +and the +.B <space> +character are automatically included. +Characters also specified as +.B cntrl +are not allowed. + +.TP +.I xdigit +followed by a list of characters classified as hexadecimal +digits. The decimal digits must be included followed by one or +more set of six characters in ascending order. The following +characters are included by default: +.B 0 +trough +.BR 9 , +.B a +trough +.BR f , +.B A +trough +.BR F . + +.TP +.I blank +followed by a list of characters classified as +.BR blank . +The characters +.B <space> +and +.B <tab> +are automatically included. + +.TP +.I toupper +followed by a list of mappings from lowercase to uppercase +letters. Each mapping is a pair of a lowercase and an uppercase letter +separated with a +.B , +and enclosed in parentheses. The members of the list are separated +with semicolons. +.TP +.I tolower +followed by a list of mappings from uppercase to lowercase +letters. If the keyword tolower is not present, the reverse of the +toupper list is used. + +.PP +The +.B LC_CTYPE +definition ends with the string +.I END LC_CYTPE. + +.SS LC_COLLATE +The +.B LC_COLLATE +category defines the rules for collating characters. Due to +limitations of libc not all POSIX-options are implemented. + +The definition starts with the string +.B LC_COLLATE +in the first column. + +There are the following keywords allowed: + +.TP +.I collating-element + +.TP +.I collating-symbol + +.PP +The order-definition starts with a line: +.TP +.I order_start +.PP +followed by a list of keywords out of +.B forward, +.B backward, +or +.B position. +The order definition consists of lines that describe the order +and is terminated with the keyword +.TP +.I order_end. +.PP + +For more details see the sources in +.B /usr/lib/nls/src +notably the examples +.B POSIX, +.B Example +and +.B Example2 + +.PP +The +.B LC_COLLATE +definition ends with the string +.I END LC_COLLATE. + +.SS LC_MONETARY +The definition starts with the string +.B LC_MONETARY +in the first column. + +There are the following keywords allowed: + +.TP +.I int_curr_symbol +followed by the international currency symbol. This must be a +4-character string containing the international currency symbol as +defined by the ISO 4217 standard (three characters) followed by a +separator. +.TP +.I currency_symbol +followed by the local currency symbol. +.TP +.I mon_decimal_point +followed by the string that will be used as the decimal delimiter +when formatting monetary quantities. +.TP +.I mon_thousands_sep +followed by the string that will be used as a group separator +when formatting monetary quantities. +.TP +.I mon_grouping +followed by a string that describes the formatting of numeric +quantities. +.TP +.I positive_sign +followed by a string that is used to indicate a positive sign for +monetary quantities. +.TP +.I negative_sign +followed by a string that is used to indicate a negative sign for +monetary quantities. +.TP +.I int_frac_digits +followed by the number of fractional digits that should be used when +formatting with the +.B int_curr_symbol. +.TP +.I frac_digits +followed by the number of fractional digits that should be used when +formatting with the +.B currency_symbol. +.TP +.I p_cs_precedes +followed by an integer set to +.B 1 +if the +.I currency_symbol +or +.I int_curr_symbol + should precede the formatted monetary quantity or set to +.B 0 +if the symbol succeeds the value. +.TP +.I p_sep_by_space +followed by an integer. +.RS +.TP +.B 0 +means that no space should be printed between the symbol and the +value. +.TP +.B 1 +means that a space should be printed between the symbol and the +value. +.TP +.B 2 +means that a space should be printed between the symbol and the +sign string, if adjacent. +.RE +.TP +.I n_cs_precedes +.RS +.TP +.B 0 +- the symbol succeeds the value. +.TP +.B 1 +- the symbol precedes the value. +.RE +.TP +.I n_sep_by_space +An integer set to +.B 0 +if no space separates the +.I currency_symbol +or +.I int_curr_symbol +from the value for a negative monetary quantity, set to +.B 1 +if a space separates the symbol from the value and set to +.B 2 +if a space separates the symbol and the sign string, if adjacent. +.TP +.I p_sign_posn +.RS +.TP +.B 0 +Parentheses enclose the quantity and the +.I currency_symbol +or +.I int_curr_symbol. +.TP +.B 1 +The sign string precedes the quantity and the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 2 +The sign string succeeds the quantity and the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 3 +The sign string precedes the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 4 +The sign string succeeds the +.I currency_symbol +or the +.I int_curr_symbol. +.RE +.TP +.I n_sign_posn +.RS +.TP +.B 0 +Parentheses enclose the quantity and the +.I currency_symbol +or +.I int_curr_symbol. +.TP +.B 1 +The sign string precedes the quantity and the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 2 +The sign string succeeds the quantity and the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 3 +The sign string precedes the +.I currency_symbol +or the +.I int_curr_symbol. +.TP +.B 4 +The sign string succeeds the +.I currency_symbol +or the +.I int_curr_symbol. +.RE +.PP +The +.B LC_MONETARY +definition ends with the string +.I END LC_MONETARY. + +.SS LC_NUMERIC +The definition starts with the string +.B LC_NUMERIC +in the first column. + +The following keywords are allowed: + +.TP +.I decimal_point +followed by the string that will be used as the decimal delimiter +when formatting numeric quantities. +.TP +.I thousands_sep +followed by the string that will be used as a group separator +when formatting numeric quantities. +.TP +.I grouping +followed by a string that describes the formatting of numeric +quantities. +.PP +The +.B LC_NUMERIC +definition ends with the string +.I END LC_NUMERIC. + +.SS LC_TIME +The definition starts with the string +.B LC_TIME +in the first column. + +The following keywords are allowed: + +.TP +.I abday +followed by a list of abbreviated weekday names. The list starts with +Sunday or its translation. +.TP +.I day +followed by a list of weekday names. The list starts with Sunday. +.TP +.I abmon +followed by a list of abbreviated month names. +.TP +.I mon +followed by a list of month names. +.TP +.I am_pm +The appropriate representation of the +.B am +and +.B pm +strings. +.TP +.I d_t_fmt +The appropriate date and time format. +.TP +.I d_fmt +The appropriate date format. +.TP +.I t_fmt +The appropriate time format. +.TP +.I t_fmt_ampm +The appropriate time format when using 12h clock format. +.PP +The +.B LC_TIME +definition ends with the string +.I END LC_TIME. + +.SS LC_MESSAGES +The definition starts with the string +.B LC_MESSAGES +in the first column. + +The following keywords are allowed: + +.TP +.I yesexpr +followed by a regular expression that describes possible +yes-responses. +.TP +.I noexpr +followed by a regular expression that describes possible +no-responses. + +.PP +The +.B LC_MESSAGES +definition ends with the string +.I END LC_MESSAGES. + +See the POSIX.2 standard for details. +.SH FILES +/usr/lib/locale/ +\- database for the current locale setting of that category +.br +/usr/lib/nls/charmap/* \- charmap-files +.SH BUGS +The manpage isn't complete. +.\" .SH AUTHOR +.\" Jochen Hein (Hein@Student.TU-Clausthal.de) +.SH "CONFORMING TO" +POSIX.2 +.SH "SEE ALSO" +.BR locale (1), +.BR localedef (1), +.BR localeconv (3), +.BR setlocale (3), +.BR charmap (5) diff --git a/man5/motd.5 b/man5/motd.5 new file mode 100644 index 000000000..904b0258b --- /dev/null +++ b/man5/motd.5 @@ -0,0 +1,40 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993 +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified Sat Jul 24 17:08:16 1993 by Rik Faith <faith@cs.unc.edu> +.\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond <esr@thyrsus.com> +.TH MOTD 5 1992-12-29 "Linux" "Linux Programmer's Manual" +.SH NAME +motd \- message of the day +.SH DESCRIPTION +The contents of \fB/etc/motd\fP are displayed by +.BR login (1) +after a successful login but just before it executes the login shell. + +The abbreviation "motd" stands for "message of the day", and this file +has been traditionally used for exactly that (it requires much less disk +space than mail to all users). +.SH FILES +/etc/motd +.SH "SEE ALSO" +.BR login (1), +.BR issue (5) diff --git a/man5/nologin.5 b/man5/nologin.5 new file mode 100644 index 000000000..5fb01379a --- /dev/null +++ b/man5/nologin.5 @@ -0,0 +1,37 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993 +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified Sun Jul 25 11:06:34 1993 by Rik Faith (faith@cs.unc.edu) +.\" Corrected Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond (esr@thyrsus.com) +.TH NOLOGIN 5 1992-12-29 "Linux" "Linux Programmer's Manual" +.SH NAME +nologin \- prevent non-root users from logging into the system +.SH DESCRIPTION +If the file \fB/etc/nologin\fP exists, +.BR login (1) +will allow access only to root. Other users will +be shown the contents of this file and their logins will be refused. +.SH FILES +/etc/nologin +.SH "SEE ALSO" +.BR login (1), +.BR shutdown (8) diff --git a/man5/nscd.conf.5 b/man5/nscd.conf.5 new file mode 100644 index 000000000..6e175eb24 --- /dev/null +++ b/man5/nscd.conf.5 @@ -0,0 +1,125 @@ +.\" -*- nroff -*- +.\" Copyright (c) 1999, 2000 SuSE GmbH Nuernberg, Germany +.\" Author: Thorsten Kukuk <kukuk@suse.de> +.\" +.\" This program is free software; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of the +.\" License, or (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +.\" General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this program; see the file COPYING. If not, +.\" write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +.\" Boston, MA 02111-1307, USA. +.\" +.TH NSCD.CONF 5 1999-10 "GNU C Library" +.SH NAME +/etc/nscd.conf - name service cache daemon configuration file +.SH DESCRIPTION +The file +.B /etc/nscd.conf +is read from +.BR nscd (8) +at startup. Each line specifies either an attribute and a value, or an +attribute, service, and a value. Fields are separated either by SPACE +or TAB characters. A `#' (number sign) indicates the beginning of a +comment; following characters, up to the end of the line, +are not interpreted by nscd. + + +Valid services are passwd, group, or hosts. + +.B logfile +.I debug-file-name +.RS +Specifies name of the file to which debug info should be written. +.RE + +.B debug-level +.I value +.RS +Sets the desired debug level. +.RE + +.B threads +.I number +.RS +This is the number of threads that are started to wait for +requests. At least five threads will always be created. +.RE + +.B server-user +.I user +.RS +If this option is set, nscd will run as this user and not as root. +If a separate cache for every user is used (-S parameter), this +option is ignored. +.RE + +.B enable-cache +.I service +.I <yes|no> +.RS +Enables or disables the specified +.I service +cache. +.RE + +.B positive-time-to-live +.I service +.I value +.RS +Sets the TTL (time-to-live) for positive entries (successful queries) +in the specified cache for +.IR service . +.I Value +is in seconds. Larger values increase cache hit rates and reduce mean +response times, but increase problems with cache coherence. +.RE + +.B negative-time-to-live +.I service +.I value +.RS +Sets the TTL (time-to-live) for negative entries (unsuccessful queries) +in the specified cache for +.IR service . +.I Value +is in seconds. Can result in significant performance improvements if there +are several files owned by uids (user IDs) not in system databases (for +example untarring the linux kernel sources as root); should be kept small +to reduce cache coherency problems. +.RE + +.B suggested-size +.I service +.I value +.RS +This is the internal hash table size, +.I value +should remain a prime number for optimum efficiency. +.RE + +.B check-files +.I service +.I <yes|no> +.RS +Enables or disables checking the file belonging to the specified +.I service +for changes. The files are +.IR /etc/passwd , +.IR /etc/group , +and +.IR /etc/hosts . +.RE + +.SH "SEE ALSO" +.BR nscd (8) +.SH AUTHOR +.B nscd +was written by Thorsten Kukuk and Ulrich Drepper. diff --git a/man5/nsswitch.conf.5 b/man5/nsswitch.conf.5 new file mode 100644 index 000000000..4c2170345 --- /dev/null +++ b/man5/nsswitch.conf.5 @@ -0,0 +1,264 @@ +.\" Copyright (c) 1998, 1999 Thorsten Kukuk (kukuk@vt.uni-paderborn.de) +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" This manual page based on the GNU C Library info pages. +.\" +.TH NSSWITCH.CONF 5 1999-01-17 "Linux" "Linux Programmer's Manual" +.SH NAME +nsswitch.conf \- System Databases and Name Service Switch configuration file +.SH DESCRIPTION +Various functions in the C Library need to be configured to work +correctly in the local environment. Traditionally, this was done by +using files (e.g., `/etc/passwd'), but other nameservices (like the +Network Information Service (NIS) and the Domain Name Service (DNS)) +became popular, and were hacked into the C library, usually with a fixed +search order. +.LP +The Linux libc5 with NYS support and the GNU C Library 2.x (libc.so.6) +contain a cleaner solution of this problem. It is designed after a method +used by Sun Microsystems in the C library of Solaris 2. We follow their +name and call this scheme "Name Service Switch" (NSS). The sources for +the "databases" and their lookup order are specified in the +.B /etc/nsswitch.conf +file. +.LP +The following databases are available in the NSS: +.TP +.B aliases +Mail aliases, used by +.BR sendmail (8). +Presently ignored. +.TP +.B ethers +Ethernet numbers. +.TP +.B group +Groups of users, used by +.BR getgrent (3) +functions. +.TP +.B hosts +Host names and numbers, used by +.BR gethostbyname (3) +and similar functions. +.TP +.B netgroup +Network wide list of hosts and users, used for access rules. +C libraries before glibc 2.1 only support netgroups over NIS. +.TP +.B network +Network names and numbers, used by +.BR getnetent (3) +functions. +.TP +.B passwd +User passwords, used by +.BR getpwent (3) +functions. +.TP +.B protocols +Network protocols, used by +.BR getprotoent (3) +functions. +.TP +.B publickey +Public and secret keys for Secure_RPC used by NFS and NIS+. +.TP +.B rpc +Remote procedure call names and numbers, used by +.BR getrpcbyname (3) +and similar functions. +.TP +.B services +Network services, used by +.BR getservent (3) +functions. +.TP +.B shadow +Shadow user passwords, used by +.BR getspnam (3). +.LP +An example +.B /etc/nsswitch.conf +(namely, the default used when +.B /etc/nsswitch.conf +is missing): +.sp 1n +.PD 0 +.TP 16 +passwd: +compat +.TP +group: +compat +.TP +shadow: +compat +.sp 1n +.TP +hosts: +dns [!UNAVAIL=return] files +.TP +networks: +nis [NOTFOUND=return] files +.TP +ethers: +nis [NOTFOUND=return] files +.TP +protocols: +nis [NOTFOUND=return] files +.TP +rpc: +nis [NOTFOUND=return] files +.TP +services: +nis [NOTFOUND=return] files +.PD +.LP +The first column is the database. +The rest of the line specifies how the lookup process works. +You can specify the way it works for each database individually. +.LP +The configuration specification for each database can contain two +different items: +.PD 0 +.TP +* The service specification like `files', `db', or `nis'. +.TP +* The reaction on lookup result like `[NOTFOUND=return]'. +.PD +.LP +For libc5 with NYS, the allowed service specifications are `files', `nis', +and `nisplus'. For hosts, you could specify `dns' as extra service, for +passwd and group `compat', but not for shadow. +.LP +For glibc, you must have a file called +.BI /lib/libnss_SERVICE.so. X +for every SERVICE you are using. On a standard installation, you could use +`files', `db', `nis', and `nisplus'. For hosts, you could specify `dns' as +extra service, for passwd, group, and shadow `compat'. These services will not +be used by libc5 with NYS. +The version number +.I X +is 1 for glibc 2.0 and 2 for glibc 2.1. +.LP +The second item in the specification gives the user much finer +control on the lookup process. Action items are placed between two +service names and are written within brackets. The general form is +.LP +`[' ( `!'? STATUS `=' ACTION )+ `]' +.LP +where +.sp 1n +.PD 0 +.TP +STATUS => success | notfound | unavail | tryagain +.TP +ACTION => return | continue +.PD +.LP +The case of the keywords is insignificant. The STATUS values are +the results of a call to a lookup function of a specific service. They +mean: +.TP +.B success +No error occurred and the wanted entry is returned. The default +action for this is `return'. +.TP +.B notfound +The lookup process works ok but the needed value was not found. +The default action is `continue'. +.TP +.B unavail +The service is permanently unavailable. This can either mean the +needed file is not available, or, for DNS, the server is not +available or does not allow queries. The default action is +`continue'. +.TP +.B tryagain +The service is temporarily unavailable. This could mean a file is +locked or a server currently cannot accept more connections. The +default action is `continue'. +.LP +.SS Interaction with +/- syntax (compat mode) +Linux libc5 without NYS does not have the name service switch but does +allow the user some policy control. In +.B /etc/passwd +you could have entries of the form +user or +@netgroup +(include the specified user from the NIS passwd map), +-user or -@netgroup (exclude the specified user), +and + (include every user, except the excluded ones, from the NIS +passwd map). Since most people only put a + at the end of +.B /etc/passwd +to include everything from NIS, the switch provides a faster +alternative for this case (`passwd: files nis') which doesn't +require the single + entry in +.BR /etc/passwd , +.BR /etc/group , +and +.BR /etc/shadow . +If this is not sufficient, the NSS `compat' service provides full ++/- semantics. By default, the source is `nis', but this may be +overriden by specifying `nisplus' as source for the pseudo-databases +.BR passwd_compat, +.B group_compat +and +.BR shadow_compat. +This pseudo-databases are only available in GNU C Library. +.SH FILES +A service named SERVICE is implemented by a shared object library named +.BI libnss_SERVICE.so. X +that resides in +.IR /lib . +.TP 25 +.PD 0 +.B /etc/nsswitch.conf +configuration file +.TP +.BI /lib/libnss_compat.so. X +implements `compat' source for glibc2 +.TP +.BI /lib/libnss_db.so. X +implements `db' source for glibc2 +.TP +.BI /lib/libnss_dns.so. X +implements `dns' source for glibc2 +.TP +.BI /lib/libnss_files.so. X +implements `files' source for glibc2 +.TP +.BI /lib/libnss_hesiod.so. X +implements `hesiod' source for glibc2 +.TP +.BI /lib/libnss_nis.so. X +implements `nis' source for glibc2 +.TP +.B /lib/libnss_nisplus.so.2 +implements `nisplus' source for glibc 2.1 +.SH NOTES +Within each process that uses +.BR nsswitch.conf , +the entire file is read only once; if the file is later changed, the +process will continue using the old configuration. +.LP +With Solaris, it isn't possible to link programs using the NSS Service +statically. With Linux, this is no problem. diff --git a/man5/passwd.5 b/man5/passwd.5 new file mode 100644 index 000000000..139762607 --- /dev/null +++ b/man5/passwd.5 @@ -0,0 +1,127 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993 +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified Sun Jul 25 10:46:28 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Sun Aug 21 18:12:27 1994 by Rik Faith (faith@cs.unc.edu) +.\" Modified Sun Jun 18 01:53:57 1995 by Andries Brouwer (aeb@cwi.nl) +.\" Modified Mon Jan 5 20:24:40 MET 1998 by Michael Haardt +.\" (michael@cantor.informatik.rwth-aachen.de) +.TH PASSWD 5 1998-01-05 "File formats" "Linux Programmer's Manual" +.SH NAME +passwd \- password file +.SH DESCRIPTION +.B Passwd +is a text file, that contains a list of the system's accounts, +giving for each account some useful information like user ID, +group ID, home directory, shell, etc. +Often, it also contains the encrypted passwords for each account. +It should have general read permission (many utilities, like +.BR ls (1) +use it to map user IDs to user names), but write access only for the +superuser. +.PP +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 +.I /etc/passwd +has *'s instead of encrypted passwords, and the encrypted passwords are in +.I /etc/shadow +which is readable by the superuser only. +.PP +Regardless of whether shadow passwords are used, many sysadmins +use a star in the encrypted password field to make sure +that this user can not authenticate him- or herself using a +password. (But see the Notes below.) +.PP +If you create a new login, first put a star in the password field, +then use +.BR passwd (1) +to set it. +.PP +There is one entry per line, and each line has the format: +.sp +.RS +account:password:UID:GID:GECOS:directory:shell +.RE +.sp +The field descriptions are: +.sp +.RS +.TP 1.0in +.I account +the name of the user on the system. It should not contain capital letters. +.TP +.I password +the encrypted user password or a star. +.TP +.I UID +the numerical user ID. +.TP +.I GID +the numerical primary group ID for this user. +.TP +.I GECOS +This field is optional and only used for informational purposes. +Usually, it contains the full user name. GECOS means General Electric +Comprehensive Operating System, which has been renamed to GCOS when +GE's large systems division was sold to Honeywell. Dennis Ritchie has +reported: "Sometimes we sent printer output or batch jobs to the GCOS +machine. The gcos field in the password file was a place to stash the +information for the $IDENTcard. Not elegant." +.TP +.I directory +the user's $HOME directory. +.TP +.I shell +the program to run at login (if empty, use +.BR /bin/sh ). +If set to a non-existing executable, the user will be unable to login +through +.BR login (1). +.RE +.SH NOTE +If you want to create +user groups, their GIDs must be equal and there must be an entry in +\fI/etc/group\fP, or no group will exist. +.PP +If the encrypted password is set to a star, the user will be unable +to login using +.BR login (1), +but may still login using +.BR rlogin (1), +run existing processes and initiate new ones through +.BR rsh (1), +.BR cron (1), +.BR at (1), +or mail filters, etc. Trying to lock an account by simply changing the +shell field yields the same result and additionally allows the use of +.BR su (1). +.SH FILES +.I /etc/passwd +.SH "SEE ALSO" +.BR login (1), +.BR passwd (1), +.BR su (1), +.BR group (5), +.BR shadow (5) diff --git a/man5/proc.5 b/man5/proc.5 new file mode 100644 index 000000000..8165ba7d9 --- /dev/null +++ b/man5/proc.5 @@ -0,0 +1,1462 @@ +.\" Copyright (C) 1994, 1995 by Daniel Quinlan (quinlan@yggdrasil.com) +.\" with networking additions from Alan Cox (A.Cox@swansea.ac.uk) +.\" and scsi additions from Michael Neuffer (neuffer@mail.uni-mainz.de) +.\" and sysctl additions from Andries Brouwer (aeb@cwi.nl) +.\" and System V IPC (as well as various other) additions from +.\" Michael Kerrisk (mtk16@ext.canterbury.ac.nz) +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified 1995-05-17 by faith@cs.unc.edu +.\" Minor changes by aeb and Marty Leisner (leisner@sdsp.mc.xerox.com). +.\" Modified 1996-04-13, 1996-07-22 by aeb@cwi.nl +.\" Modified 2001-12-16 by rwhron@earthlink.net +.\" Modified 2002-07-13 by jbelton@shaw.ca +.\" Modified 2002-07-22, 2003-05-27, 2004-04-06, 2004-05-25 +.\" by Michael Kerrisk <mtk16@ext.canterbury.ac.nz> +.\" +.TH PROC 5 2004-05-25 "" "Linux Programmer's Manual" +.SH NAME +proc \- process information pseudo-filesystem + +.SH DESCRIPTION +The +.I proc +filesystem is a pseudo-filesystem which is used as an interface to +kernel data structures. It is commonly mounted at +.IR /proc . +Most of it is read-only, but some files allow kernel variables to be +changed. +.LP +The following outline gives a quick tour through the /proc hierarchy. +.PD 1 +.TP +.I /proc/[number] +There is a numerical subdirectory for each running process; the +subdirectory is named by the process ID. +Each such subdirectory contains the following +pseudo-files and directories. +.TP +.I /proc/[number]/cmdline +This holds the complete command line for the process, unless the whole +process has been swapped out or the process is a zombie. In +either of these latter cases, there is nothing in this file: i.e. a +read on this file will return 0 characters. +The command line arguments appear in this file as a set of +null-separated strings, with a further null byte after the last string. +.TP +.I /proc/[number]/cwd +This is a link to the current working directory of the process. To find +out +the cwd of process 20, for instance, you can do this: + +.br +.nf +.ft CW +cd /proc/20/cwd; /bin/pwd +.fi +.ft + +Note that the pwd command is often a shell builtin, and might +not work properly. In bash, you may use pwd -P. +.TP +.I /proc/[number]/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: + +.br +.nf +.ft CW +(cat /proc/1/environ; echo) | tr "\\000" "\\n" +.fi +.ft P + +(For a reason why one should want to do this, see +.BR lilo (8).) +.TP +.I /proc/[number]/exe +Under Linux 2.2 and later, this file is a symbolic link +containing the actual path name of the executed command. +This symbolic link can be dereferenced normally - attempting to open +it will open the executable. You can even type +.I /proc/[number]/exe +to run another copy of the same process as [number]. + +Under Linux 2.0 and earlier +.I /proc/[number]/exe +is a pointer to the binary which was executed, +and appears as a symbolic link. A +.BR readlink (2) +call on this file under Linux 2.0 returns a string in the format: + +[device]:inode + +For example, [0301]:1502 would be inode 1502 on device major 03 (IDE, +MFM, etc. drives) minor 01 (first partition on the first drive). + +.BR find (1) +with the -inum option can be used to locate the file. +.TP +.I /proc/[number]/fd +This is a subdirectory containing one entry for each file which the +process has open, named by its file descriptor, and which is a +symbolic link to the actual file. Thus, 0 is +standard input, 1 standard output, 2 standard error, etc. + +Programs that will take a filename, but will not take the standard +input, and which 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: +.br +.nf + +\f(CWfoobar -i /proc/self/fd/0 -o /proc/self/fd/1 ...\fR + +.fi +.br +and you have a working filter. +.\" The following is not true in my tests (MTK): +.\" Note that this will not work for +.\" programs that seek on their files, as 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. +.TP +.I /proc/[number]/maps +A file containing the currently mapped memory regions and their access +permissions. + +The format is: + +.nf +.ft CW +.in 8n +address perms offset dev inode pathname +08048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm +08056000-08058000 rw-p 0000d000 03:0c 64593 /usr/sbin/gpm +08058000-0805b000 rwxp 00000000 00:00 0 +40000000-40013000 r-xp 00000000 03:0c 4165 /lib/ld-2.2.4.so +40013000-40015000 rw-p 00012000 03:0c 4165 /lib/ld-2.2.4.so +4001f000-40135000 r-xp 00000000 03:0c 45494 /lib/libc-2.2.4.so +40135000-4013e000 rw-p 00115000 03:0c 45494 /lib/libc-2.2.4.so +4013e000-40142000 rw-p 00000000 00:00 0 +bffff000-c0000000 rwxp 00000000 00:00 0 +.ft +.fi +.in + +where address is the address space in the process that it occupies, +perms is a set of permissions: + +.nf +.in +5 +r = read +w = write +x = execute +s = shared +p = private (copy on write) +.fi +.in + +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. + +Under Linux 2.0 there is no field giving pathname. +.TP +.I /proc/[number]/mem +This file can be used to access the pages of a process's memory through +.BR open (2), +.BR read (2), +and +.BR fseek (3). +.TP +.I /proc/[number]/root +Unix and Linux support the idea of a per-process root of the +filesystem, set by the +.BR chroot (2) +system call. This file is a symbolic link that points to the process's +root directory, and behaves as exe, fd/*, etc. do. +.TP +.I /proc/[number]/stat +Status information about the process. This is used by +.BR ps (1). +It is defined in +.IR /usr/src/linux/fs/proc/array.c "." + +The fields, in order, with their proper +.BR scanf (3) +format specifiers, are: +.RS +.TP +\fIpid\fP %d +The process id. +.TP +\fIcomm\fP %s +The filename of the executable, in parentheses. This is visible +whether or not the executable is swapped out. +.TP +\fIstate\fP %c +One character from the string "RSDZTW" where R is running, S is +sleeping in an interruptible wait, D is waiting in uninterruptible +disk sleep, Z is zombie, T is traced or stopped (on a signal), +and W is paging. +.TP +\fIppid\fP %d +The PID of the parent. +.TP +\fIpgrp\fP %d +The process group ID of the process. +.TP +\fIsession\fP %d +The session ID of the process. +.TP +.\" tty_nr needs better explanation. +\fItty_nr\fP %d +The tty the process uses. +.TP +\fItpgid\fP %d +.\" This field and following, up to and including wchan added 0.99.1 +The process group ID of the process which currently owns the tty that +the process is connected to. +.TP +\fIflags\fP %lu +The kernel flags word of the process. For bit meanings, +see the PF_* defines in +.IR <linux/sched.h> . +Details depend on the kernel version. +.TP +\fIminflt\fP %lu +The number of minor faults the process has made which have not +required loading a memory page from disk. +.TP +\fIcminflt\fP %lu +The number of minor faults that the process's +waited-for children have made. +.TP +\fImajflt\fP %lu +The number of major faults the process has made which have +required loading a memory page from disk. +.TP +\fIcmajflt\fP %lu +The number of major faults that the process's +waited-for children have made. +.TP +\fIutime\fP %lu +The number of jiffies that this process has been scheduled in user +mode. +.TP +\fIstime\fP %lu +The number of jiffies that this process has been scheduled in kernel +mode. +.TP +\fIcutime\fP %ld +The number of jiffies that this process's +waited-for children have been scheduled in user mode. (See also +.BR times (2).) +.TP +\fIcstime\fP %ld +The number of jiffies that this process's +waited-for children have been scheduled in kernel mode. +.TP +\fIpriority\fP %ld +The standard nice value, plus fifteen. The value is never negative in +the kernel. +.TP +\fInice\fP %ld +The nice value ranges from 19 (nicest) to -19 (not nice to others). +.TP +.\" .TP +.\" \fIcounter\fP %ld +.\" 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. +.\" .TP +.\" \fItimeout\fP %u +.\" The time in jiffies of the process's next timeout. +\fI0\fP %ld +This value is hard coded to 0 as a placeholder for a removed field. +.TP +\fIitrealvalue\fP %ld +The time in jiffies before the next SIGALRM is sent to the process +due to an interval timer. +.TP +\fIstarttime\fP %lu +The time in jiffies the process started after system boot. +.TP +\fIvsize\fP %lu +Virtual memory size in bytes. +.TP +\fIrss\fP %ld +Resident Set Size: number of pages the process has in real memory, +minus 3 for administrative purposes. This is just the pages which +count towards text, data, or stack space. This does not include pages +which have not been demand-loaded in, or which are swapped out. +.TP +\fIrlim\fP %lu +Current limit in bytes on the rss of the process (usually +4294967295 on i386). +.TP +\fIstartcode\fP %lu +The address above which program text can run. +.TP +\fIendcode\fP %lu +The address below which program text can run. +.TP +\fIstartstack\fP %lu +The address of the start of the stack. +.TP +\fIkstkesp\fP %lu +The current value of esp (stack pointer), as found in the +kernel stack page for the process. +.TP +\fIkstkeip\fP %lu +The current EIP (instruction pointer). +.TP +\fIsignal\fP %lu +The bitmap of pending signals (usually 0). +.TP +\fIblocked\fP %lu +The bitmap of blocked signals (usually 0, 2 for shells). +.TP +\fIsigignore\fP %lu +The bitmap of ignored signals. +.TP +\fIsigcatch\fP %lu +The bitmap of catched signals. +.TP +\fIwchan\fP %lu +This is the "channel" in which the process is waiting. It is the +address of a system call, and can be looked up in a namelist if you +need a textual name. (If you have an up-to-date /etc/psdatabase, then +try \fIps -l\fP to see the WCHAN field in action.) +.TP +\fInswap\fP %lu +Number of pages swapped - not maintained. +.TP +\fIcnswap\fP %lu +Cumulative \fInswap\fP for child processes. +.TP +\fIexit_signal\fP %d +Signal to be sent to parent when we die. +.TP +\fIprocessor\fP %d +CPU number last executed on. +.RE +.TP +.I /proc/[number]/statm +Provides information about memory status in pages. The columns are: + size total program size + resident resident set size + share shared pages + trs text (code) + drs data/stack + lrs library + dt dirty pages +.TP +.I /proc/[number]/status +Provides much of the information in +.I /proc/[number]/stat +and +.I /proc/[number]/statm +in a format that's easier for humans to parse. +.TP +.I /proc/apm +Advanced power management version and battery information +when CONFIG_APM is defined at kernel compilation time. +.TP +.I /proc/bus +Contains subdirectories for installed busses. +.TP +.I /proc/bus/pccard +Subdirectory for pcmcia devices when CONFIG_PCMCIA is set +at kernel compilation time. +.TP +.I /proc/bus/pccard/drivers +.TP +.I /proc/bus/pci +Contains various bus subdirectories and pseudo-files containing +information about pci busses, installed devices, and device +drivers. Some of these files are not ASCII. +.TP +.I /proc/bus/pci/devices +Information about pci devices. They may be accessed through +.BR lspci (8) +and +.BR setpci (8). +.TP +.I /proc/cmdline +Arguments passed to the Linux kernel at boot time. Often done via +a boot manager such as +.BR lilo (1). +.TP +.I /proc/cpuinfo +This is a collection of CPU and system architecture dependent items, +for each supported architecture a different list. +Two common entries are \fIprocessor\fP which gives CPU number and +\fIbogomips\fP; a system constant that is calculated +during kernel initialization. SMP machines have information for +each CPU. +.TP +.I /proc/devices +Text listing of major numbers and device groups. This can be used by +MAKEDEV scripts for consistency with the kernel. +.TP +.IR /proc/diskstats " (since Linux 2.5.69)" +This file contains disk I/O statistics for each disk device. +See the kernel source file +.I Documentation/iostats.txt +for further information. +.TP +.I /proc/dma +This is a list of the registered \fIISA\fP DMA (direct memory access) +channels in use. +.TP +.I /proc/driver +Empty subdirectory. +.TP +.I /proc/execdomains +List of the execution domains (ABI personalities). +.TP +.I /proc/fb +Frame buffer information when CONFIG_FB is defined during kernel +compilation. +.TP +.I /proc/filesystems +A text listing of the filesystems which were compiled into the kernel. +Incidentally, this is used by +.BR mount (1) +to cycle through different filesystems when none is specified. +.TP +.I /proc/fs +Empty subdirectory. +.TP +.I /proc/ide +This directory +exists on systems with the ide bus. There are directories for each +ide channel and attached device. Files include: + +.nf +cache buffer size in KB +capacity number of sectors +driver driver version +geometry physical and logical geometry +identify in hexidecimal +media media type +model manufacturer's model number +settings drive settings +smart_thresholds in hexidecimal +smart_values in hexidecimal +.fi + +The +.BR hdparm (8) +utility provides access to this information in a friendly format. +.TP +.I /proc/interrupts +This is used to record the number of interrupts per each IRQ on (at +least) the i386 architechure. Very easy to read formatting, done in +ASCII. +.TP +.I /proc/iomem +I/O memory map in Linux 2.4. +.TP +.I /proc/ioports +This is a list of currently registered Input-Output port regions that +are in use. +.TP +.IR /proc/kallsyms " (since Linux 2.5.71)" +This holds the kernel exported symbol definitions used by the +.BR modules (X) +tools to dynamically link and bind loadable modules. +In Linux 2.5.47 and earlier, a similar file with slightly different syntax +was named +.IR ksyms . +.TP +.I /proc/kcore +This file represents the physical memory of the system and is stored +in the ELF core file format. With this pseudo-file, and an unstripped +kernel (/usr/src/linux/vmlinux) 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. +.TP +.I /proc/kmsg +This file can be used instead of the +.BR syslog (2) +system call to read 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 +which uses the +.BR syslog (2) +system call facility to log kernel messages. + +Information in this file is retrieved with the +.BR dmesg (8) +program. +.TP +.IR /proc/ksyms " (Linux 1.1.23-2.5.47)" +See +.IR /proc/kallsyms . +.TP +.I /proc/loadavg +The load average numbers give the number of jobs in the run queue (state +R) +or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes. +They are the same as the load average numbers given by +.BR uptime (1) +and other programs. +.TP +.I /proc/locks +This file shows current file locks +.RB ( flock "(2) and " fcntl (2)) +and leases +.RB ( fcntl (2)). +.TP +.I /proc/malloc +This file is only present if CONFIGDEBUGMALLOC was defined during +compilation. +.TP +.I /proc/meminfo +This is used by +.BR 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 +.BR free (1), +except in bytes rather than KB. +.TP +.I /proc/mounts +This is a list of all the file systems currently mounted on the system. +The format of this file is documented in +.IR fstab (5). +.TP +.I /proc/modules +A text list of the modules that have been loaded by the system. +See also +.BR lsmod (8). +.TP +.I /proc/mtrr +Memory Type Range Registers. +See +.I /usr/src/linux/Documentation/mtrr.txt +for details. +.TP +.I /proc/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 +.BR netstat (8) +suite provides much cleaner access to these files. +.TP +.I /proc/net/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: + +.nf +.ft CW +.in 8n +IP address HW type Flags HW address Mask Device +192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0 +192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0 +.ft +.fi +.in + +Here 'IP address' is the IPv4 address of the machine and 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 data link layer mapping for that IP address if +it is known. +.TP +.I /proc/net/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 +.BR ifconfig (8) +program to report device status. The format is: + +.nf +.ft CW +.in 1n +Inter-| Receive | Transmit + face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed + lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0 + eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0 + ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0 + tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0 +.in +.ft +.fi +.\" .TP +.\" .I /proc/net/ipx +.\" No information. +.\" .TP +.\" .I /proc/net/ipx_route +.\" No information. +.TP +.I /proc/net/dev_mcast +Defined in +.IR /usr/src/linux/net/core/dev_mcast.c : +.nf +.in +5 +indx ifterface_name dmi_u dmi_g dmi_address +2 eth0 1 0 01005e000001 +3 eth1 1 0 01005e000001 +4 eth2 1 0 01005e000001 +.in +.fi +.TP +.I /proc/net/igmp +Internet Group Management Protocol. Defined in +.IR /usr/src/linux/net/core/igmp.c . +.TP +.I /proc/net/rarp +This file uses the same format as the +.I arp +file and contains the current reverse mapping database used to provide +.BR rarp (8) +reverse address lookup services. If RARP is not configured into the +kernel, +this file will not be present. +.TP +.I /proc/net/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. +.\" .TP +.\" .I /proc/net/route +.\" No information, but looks similar to +.\" .BR route (8). +.TP +.I /proc/net/snmp +This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP +management +information bases for an snmp agent. +.TP +.I /proc/net/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. +.TP +.I /proc/net/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: + +.nf +.ft CW +.in 1n +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 +.in +.ft +.fi +.TP +.I /proc/net/unix +Lists the UNIX domain sockets present within the system and their +status. The format is: +.nf +.sp .5 +.ft CW +Num RefCount Protocol Flags Type St Path + 0: 00000002 00000000 00000000 0001 03 + 1: 00000001 00000000 00010000 0001 01 /dev/printer +.ft +.sp .5 +.fi + +Here 'Num' is the kernel table slot number, 'RefCount' is the number +of users of the socket, 'Protocol' is currently always 0, 'Flags' +represent the internal kernel flags holding the status of the +socket. Currently, type is 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. +.TP +.I /proc/partitions +Contains major and minor numbers of each partition as well as number +of blocks and partition name. +.TP +.I /proc/pci +This is a listing of all PCI devices found during kernel initialization +and their configuration. +.TP +.I /proc/scsi +A directory with the scsi midlevel pseudo-file and various SCSI lowlevel +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. +.TP +.I /proc/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 \fIadd-single-device\fP command which +allows +root to add a hotplugged device to the list of known devices. + +An +.B echo 'scsi add-single-device 1 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. +.TP +.I /proc/scsi/[drivername] +\fI[drivername]\fP can currently be NCR53c7xx, aha152x, aha1542, aha1740, +aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic, +scsi_debug, seagate, t128, u15-24f, ultrastore, 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 was assigned during +initialization. + +Reading these files will usually show driver and host configuration, +statistics etc. + +Writing to these files allows different things on different hosts. +For example, with the \fIlatency\fP and \fInolatency\fP commands, +root can switch on and off command latency measurement code in the +eata_dma driver. With the \fIlockup\fP and \fIunlock\fP commands, +root can control bus lockups simulated by the scsi_debug driver. +.TP +.I /proc/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. +.TP +.I /proc/slabinfo +Information about kernel caches. The columns are: +.nf +cache-name +num-active-objs +total-objs +object-size +num-active-slabs +total-slabs +num-pages-per-slab +.fi +See +.BR slabinfo (5) +for details. +.TP +.I /proc/stat +kernel/system statistics. Varies with architecture. Common +entries include: +.RS +.TP +\fIcpu 3357 0 4313 1362393\fP +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, respectively. The last value should be 100 times the +second entry in the uptime pseudo-file. +.TP +\fIpage 5741 1808\fP +The number of pages the system paged in and the number that were paged +out (from disk). +.TP +\fIswap 1 0\fP +The number of swap pages that have been brought in and out. +.TP +\fIintr 1462898\fP +The number of interrupts received from the system boot. +.TP +\fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP... +(major,minor):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written) +.TP +\fIctxt 115315\fP +The number of context switches that the system underwent. +.TP +\fIbtime 769041601\fP +boot time, in seconds since the epoch (January 1, 1970). +.TP +\fIprocesses 86031\fP +Number of forks since boot. +.RE +.TP +.I /proc/swaps +Swap areas in use. See also +.BR swapon (8). +.TP +.I /proc/sys +This directory (present since 1.3.57) contains a number of files +and subdirectories corresponding to kernel variables. +These variables can be read and sometimes modified using +the \fIproc\fP file system, and the +.BR sysctl (2) +system call. Presently, there are subdirectories +.IR abi ", " debug ", " dev ", " fs ", " kernel ", " net ", " proc ", " +.IR rxrpc ", " sunrpc " and " vm +that each contain more files and subdirectories. +.TP +.I /proc/sys/abi +This directory may contain files with application binary information. +On some systems, it is not present. +.TP +.I /proc/sys/debug +This directory may be empty. +.TP +.I /proc/sys/dev +This directory contains device specific information (eg dev/cdrom/info). +On +some systems, it may be empty. +.TP +.I /proc/sys/fs +This contains the subdirectory +.IR binfmt_misc +and files +.IR dentry-state ", " dir-notify-enable ", " dquot-nr ", " file-max ", " +.IR file-nr ", " inode-max ", " inode-nr ", " inode-state ", " +.IR lease-break-time ", " leases-enable ", " overflowgid ", " overflowuid +.IR super-max " and " super-nr +with function fairly clear from the name. +.TP +.I /proc/sys/fs/binfmt_misc +Documentation for files in this directory can in the kernel sources in +.IR Documentation/binfmt_misc.txt . +.TP +.I /proc/sys/fs/dentry-state +This file contains six numbers, +.IR nr_dentry ", " nr_unused ", " age_limit " (age in seconds), " +want_pages +(pages requested by system) and two dummy values. +nr_dentry seems to be 0 all the time. +nr_unused seems to be the number of unused dentries. +age_limit is the age in seconds after which dcache entries +can be reclaimed when memory is short and want_pages is +nonzero when the kernel has called shrink_dcache_pages() and the +dcache isn't pruned yet. +.TP +.I /proc/sys/fs/dir-notify-enable +This file can be used to disable or enable the +.I dnotify +interface described in +.BR fcntl (2) +on a system-wide basis. +A value of 0 in this file disables the interface, +and a value of 1 enables it. +.TP +.I /proc/sys/fs/dquot-max +This file shows the maximum number of cached disk quota entries. +On some (2.4) systems, it is not present. +If the number of free cached disk quota entries is very low and +you have some awesome number of simultaneous system users, +you might want to raise the limit. +.TP +.I /proc/sys/fs/dquot-nr +This file shows the number of allocated disk quota +entries and the number of free disk quota entries. +.TP +.I /proc/sys/fs/file-max +This file defines +a system-wide limit on the number of open files for all processes. +(See also +.BR setrlimit (2), +which can be used by a process to set the per-process limit, +.BR RLIMIT_NOFILE , +on the number of files it may open.) +If you get lots +of error messages about running out of file handles, +try increasing this value: +.br + +.br +.nf +.ft CW +echo 100000 > /proc/sys/fs/file-max +.fi +.ft + +The kernel constant +.I NR_OPEN +imposes an upper limit on the value that may be placed in +.IR file-max . + +If you increase +.IR /proc/sys/fs/file-max "," +be sure to increase +.I /proc/sys/fs/inode-max +to 3-4 times the new +value of +.IR /proc/sys/fs/file-max "," +or you will run out of inodes. +.TP +.I /proc/sys/fs/file-nr +This (read-only) file +gives the number of files presently opened. +It contains three numbers: The number of allocated +file handles, the number of free file handles and the maximum +number of file handles. The kernel allocates file handles dynamically, +but it +doesn't free them again. If the number of allocated files is close to the + +maximum, you should consider increasing the maximum. +When the number of free file handles is +large, you've encountered a peak in your usage of file +handles and you probably don't need to increase the maximum. +.TP +.I /proc/sys/fs/inode-max +This file contains the maximum number of in-memory inodes. +On some (2.4) systems, it may not be +present. This value should be 3-4 times larger +than the value in file-max, since stdin, stdout and network sockets also +need an inode to handle them. When you regularly run +out of inodes, you need to increase this value. +.TP +.I /proc/sys/fs/inode-nr +This file contains the first two values from inode-state. +.TP +.I /proc/sys/fs/inode-state +This file +contains seven numbers: nr_inodes, nr_free_inodes, preshrink and four +dummy +values. +nr_inodes is the number of inodes the system has +allocated. This can be slightly more than inode-max because +Linux allocates them one pageful at a time. +nr_free_inodes represents the number of free inodes. +preshrink is nonzero when the nr_inodes > inode-max and the +system needs to prune the inode list instead of allocating +more. +.TP +.I /proc/sys/fs/lease-break-time +This file +specifies the grace period that the kernel grants to a process +holding a file lease +.RB ( fcntl (2)) +after it has sent a signal to that process notifying it +that another process is waiting to open the file. +If the lease holder does not remove or downgrade the lease within +this grace period, the kernel forcibly breaks the lease. +.TP +.I /proc/sys/fs/leases-enable +This file can be used to enable or disable file leases +.RB ( fcntl (2)) +on a system-wide basis. +If this file contains the value 0, leases are disabled. +A non-zero value enables leases. +.TP +.IR /proc/sys/fs/overflowgid " and " /proc/sys/fs/overflowuid +These files +allow you to change the value of the fixed UID and GID. +The default is 65534. +Some filesystems only support 16-bit UIDs and GIDs, although in Linux +UIDs and GIDs are 32 bits. When one of these filesystems is mounted +with writes enabled, any UID or GID that would exceed 65535 is translated +to the overflow value before being written to disk. +.TP +.I /proc/sys/fs/super-max +This file +controls the maximum number of superblocks, and +thus the maximum number of mounted filesystems the kernel +can have. You only need to increase super-max if you need to +mount more filesystems than the current value in super-max +allows you to. +.TP +.I /proc/sys/fs/super-nr +This file +contains the number of filesystems currently mounted. +.TP +.I /proc/sys/kernel +This directory contains files +.IR acct ", " cad_pid ", " cap-bound ", " +.IR core_pattern ", " core_uses_pid ", " +.IR ctrl-alt-del ", " dentry-state ", " domainname ", " +.IR hotplug ", " hostname ", " +.IR htab-reclaim " (PowerPC only), " +.IR java-appletviewer " (binfmt_java, obsolete), " +.IR java-interpreter " (binfmt_java, obsolete), " l2cr " (PowerPC only), " +.IR modprobe ", " msgmax ", " msgmnb ", " +.IR msgmni ", " osrelease ", " ostype ", " overflowgid ", " overflowuid , +.IR panic ", " panic_on_oops ", " pid_max ", " +.IR powersave-nap " (PowerPC only), " printk ", " pty ", " random ", " +.IR real-root-dev ", " reboot-cmd " (SPARC only), " rtsig-max ", " +.IR rtsig-nr ", " sem ", " sg-big-buff ", " +.IR shmall ", " shmmax ", " shmmni ", " sysrq ", " tainted ", " threads-max , +.IR version " and " zero-paged " (PowerPC only) " +with function fairly clear from the name. +.TP +.I /proc/sys/kernel/acct +This file +contains three numbers: highwater, lowwater and frequency. +If BSD-style process accounting is enabled these values control +its behaviour. If free space on filesystem where the log lives +goes below lowwater percent accounting suspends. If free space gets +above highwater percent accounting resumes. Frequency determines +how often the kernel checks the amount of free space (value is in +seconds). Default values are 4, 2 and 30. +That is, suspend accounting if <= 2% of space is free; resume it +if >= 4% of space is free; consider information about amount of free space +valid for 30 seconds. +.TP +.I /proc/sys/kernel/cap-bound +This file holds the value of the kernel +.IR "capability bounding set" +(expressed as a signed decimal number). +This set is ANDed against the capabilities permitted to a process +during exec. +.TP +.I /proc/sys/kernel/core_pattern +This file +(new in Linux 2.5) provides finer control over the form of +a core filename than the obsolete +.IR /proc/sys/kernel/core_uses_pid +file described below. +The name for a core file is controlled by defining a template in +.IR /proc/sys/kernel/core_pattern . +The template can contain % specifiers which are substituted +by the following values when a core file is created: +.nf + + %% A single % character + %p PID of dumped process + %u real UID of dumped process + %g real GID of dumped process + %s number of signal causing dump + %t time of dump (secs since 0:00h, 1 Jan 1970) + %h hostname (same as the 'nodename' + returned by \fBuname\fP(2)) + %e executable filename + +.fi +A single % at the end of the template is dropped from the +core filename, as is the combination of a % followed by any +character other than those listed above. +All other characters in the template become a literal +part of the core filename. +The maximum size of the resulting core filename is 64 bytes. +The default value in this file is "core". +For backward compatibility, if +.I /proc/sys/kernel/core_pattern +does not include "%p" and +.I /proc/sys/kernel/core_uses_pid +is non-zero, then .PID will be appended to the core filename. +.TP +.I /proc/sys/kernel/core_uses_pid +This file +can be used control the naming of a core dump file on Linux 2.4. +If this file contains the value 0, then a core dump file is simply named +.IR core . +If this file contains a non-zero value, then the core dump file includes +the process ID in a name of the form +.IR core.PID . +.TP +.I /proc/sys/kernel/ctrl-alt-del +This file +controls the handling of Ctrl-Alt-Del from the keyboard. +When the value in this file is 0, Ctrl-Alt-Del is trapped and +sent to the +.BR init (1) +program to handle a graceful restart. +When the value is > 0, Linux's reaction to a Vulcan +Nerve Pinch (tm) will be an immediate reboot, without even +syncing its dirty buffers. +Note: when a program (like dosemu) has the keyboard in 'raw' +mode, the ctrl-alt-del is intercepted by the program before it +ever reaches the kernel tty layer, and it's up to the program +to decide what to do with it. +.TP +.I /proc/sys/kernel/hotplug +This file +contains the path for the hotplug policy agent. +The default value in this file "/sbin/hotplug". +.TP +.IR /proc/sys/kernel/domainname " and " /proc/sys/kernel/hostname +can be used to set the NIS/YP domainname and the +hostname of your box in exactly the same way as the commands +domainname and hostname, i.e.: +.br + +.br +# echo "darkstar" > /proc/sys/kernel/hostname +.br +# echo "mydomain" > /proc/sys/kernel/domainname +.br + +.br +has the same effect as +.br + +.br +# hostname "darkstar" +.br +# domainname "mydomain" +.br + +.br +Note, however, that the classic darkstar.frop.org has the +hostname "darkstar" and DNS (Internet Domain Name Server) +domainname "frop.org", not to be confused with the NIS (Network +Information Service) or YP (Yellow Pages) domainname. These two +domain names are in general different. For a detailed discussion +see the +.BR hostname (1) +man page. +.TP +.I /proc/sys/kernel/htab-reclaim +(PowerPC only) If this file is set to a non-zero value, +the PowerPC htab +(see kernel file Documentation/powerpc/ppc_htab.txt) is pruned +each time the system hits the idle loop. +.TP +.I /proc/sys/kernel/l2cr +(PowerPC only) This file +contains a flag that controls the L2 cache of G3 processor +boards. If 0, the cache is disabled. Enabled if nonzero. +.TP +.I /proc/sys/kernel/modprobe +This file +is described by the kernel source file Documentation/kmod.txt. +.TP +.I /proc/sys/kernel/msgmax +This file defines +a system-wide limit specifying the maximum number of bytes in +a single message written on a System V message queue. +.TP +.I /proc/sys/kernel/msgmni +This file defines the system-wide limit on the number of +message queue identifiers. +(This file is only present in Linux 2.4 onwards.) +.TP +.I /proc/sys/kernel/msgmnb +This file defines a system-wide paramter used to initialise the +.I msg_qbytes +setting for subsequenly created message queues. +The +.I msg_qbytes +setting specifies the maximum number of bytes that may be written to the +message queue. +.TP +.IR /proc/sys/kernel/ostype " and " /proc/sys/kernel/osrelease +These files +give substrings of +.IR /proc/version . +.TP +.IR /proc/sys/kernel/overflowgid " and " /proc/sys/kernel/overflowuid +These files duplicate the files +.I /proc/sys/fs/overflowgid +and +.IR /proc/sys/fs/overflowuid . +.TP +.I /proc/sys/kernel/panic +gives read/write access to the kernel variable +.IR 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 seconds. When you use the +software watchdog device driver, the recommended setting is 60. +.TP +.I /proc/sys/kernel/panic_on_oops +This file (new in Linux 2.5) controls the kernel's behaviour when an oops +or +BUG is encountered. If this file contains 0, then the system +tries to continue operation. If it contains 1, then the system +delays a few seconds (to give klogd time to record the oops output) +and then panics. +If the +.I /proc/sys/kernel/panic +file is also non-zero then the machine will be rebooted. +.TP +.I /proc/sys/kernel/pid_max +This file +(new in Linux 2.5) +specifies the value at which PIDs wrap around +(i.e., the value in this file is one greater than the maximum PID). +The default value for this file, 32768, +results in the same range of PIDs as on earlier kernels. +The value in this file can be set to any value up to 2^22 +(PID_MAX_LIMIT, approximately 4 million). +.TP +.IR /proc/sys/kernel/powersave-nap " (PowerPC only)" +This file +contains a flag. If set, Linux-PPC will use the 'nap' mode of +powersaving, +otherwise the 'doze' mode will be used. +.TP +.I /proc/sys/kernel/printk +The four values in this file +are console_loglevel, default_message_loglevel, minimum_console_level and +default_console_loglevel. +These values influence printk() behavior when printing or +logging error messages. See +.BR syslog (2) +for more info on the different loglevels. +Messages with a higher priority than +console_loglevel will be printed to the console. +Messages without an explicit priority +will be printed with priority default_message_level. +minimum_console_loglevel is the minimum (highest) value to which +console_loglevel can be set. +default_console_loglevel is the default value for console_loglevel. +.TP +.IR /proc/sys/kernel/pty " (since Linux 2.6.4)" +This directory +contains two files relating to the number of Unix 98 +pseudo-terminals (see +.BR pts (4)) +on the system. +.TP +.I /proc/sys/kernel/pty/max +This file defines the maximum number of pseudo-terminals. +.TP +.I /proc/sys/kernel/pty/nr +This read-only file +indicates how many pseudo-terminals are currently in use. +.TP +.\" FIXME say more about random +.I /proc/sys/kernel/random +This directory +contains various parameters controlling the operation of the file +.IR /dev/random . +.TP +.I /proc/sys/kernel/real-root-dev +This file +is documented in the kernel source file Documentation/initrd.txt. +.TP +.IR /proc/sys/kernel/reboot-cmd " (Sparc only) " +This file seems to be a way to give an argument to the SPARC +ROM/Flash boot loader. Maybe to tell it what to do after +rebooting? +.TP +.I /proc/sys/kernel/rtsig-max +This file can be used to tune the maximum number +of POSIX realtime (queued) signals that can be outstanding +in the system. +.TP +.I /proc/sys/kernel/rtsig-nr +This file shows the number POSIX realtime signals currently queued. +.TP +.IR /proc/sys/kernel/sem " (since Linux 2.4)" +This file contains 4 numbers defining limits for System V IPC semaphores. +These fields are, in order: +.RS +.IP SEMMSL 8 +The maximum semaphores per semaphore set. +.IP SEMMNS 8 +A system-wide limit on the number of semaphores in all semaphore sets. +.IP SEMOPM 8 +The maximum number of operations that may be specified in a +.BR semop (2) +call. +.IP SEMMNI 8 +A system-wide limit on the maximum number of semaphore identifiers. +.RE +.TP +.I /proc/sys/kernel/sg-big-buff +This file +shows the size of the generic SCSI device (sg) buffer. +You can't tune it just yet, but you could change it on +compile time by editing include/scsi/sg.h and changing +the value of SG_BIG_BUFF. However, there shouldn't be any reason to +change +this value. +.TP +.I /proc/sys/kernel/shmall +This file +contains the system-wide limit on the total number of pages of +System V shared memory. +.TP +.I /proc/sys/kernel/shmmax +This file +can be used to query and set the run time limit +on the maximum (System V IPC) shared memory segment size that can be +created. +Shared memory segments up to 1Gb are now supported in the +kernel. This value defaults to SHMMAX. +.TP +.I /proc/sys/kernel/shmmni +(available in Linux 2.4 and onwards) +This file +specifies the system-wide maximum number of System V shared memory +segments that can be created. +.TP +.I /proc/sys/kernel/version +contains a string like: +.br + +.br +#5 Wed Feb 25 21:49:24 MET 1998.TP +.br + +.br +The '#5' means that +this is the fifth kernel built from this source base and the +date behind it indicates the time the kernel was built. +.TP +.IR /proc/sys/kernel/zero-paged " (PowerPC only) " +This file +contains a flag. When enabled (non-zero), Linux-PPC will pre-zero pages in +the idle loop, possibly speeding up get_free_pages. +.TP +.I /proc/sys/net +This directory contains networking stuff. +.TP +.I /proc/sys/proc +This directory may be empty. +.TP +.I /proc/sys/sunrpc +This directory supports Sun remote procedure call for network file system +(NFS). On some systems, it is not present. +.TP +.I /proc/sys/vm +This directory contains files for memory management tuning, buffer and +cache +management. +.TP +.I /proc/sys/vm/overcommit_memory +This file contains the kernel virtual memory accounting mode. Values are: +.br +0: heuristic overcommit (this is the default) +.br +1: always overcommit, never check +.br +2: always check, never overcommit +.br +In mode 0, calls of +.BR mmap (2) +with MAP_NORESERVE set are not checked, and the default check is very weak, +leading to the risk of getting a process "OOM-killed". +Under Linux 2.4 any nonzero value implies mode 1. +In mode 2 (available since Linux 2.6), the total virtual address space +on the system is limited to (SS + RAM*(r/100)), +where SS is the size of the swap space, and RAM +is the size of the physical memory, and r is the contents of the file +.IR /proc/sys/vm/overcommit_ratio . +.TP +.I /proc/sys/vm/overcommit_ratio +See the description of +.IR /proc/sys/vm/overcommit_memory . +.TP +.I /proc/sysvipc +Subdirectory containing the pseudo-files +.IR msg ", " sem " and " shm "." +These files list the System V Interprocess Communication (IPC) objects +(respectively: message queues, semaphores, and shared memory) +that currently exist on the system, +providing similar information to that available via +.BR ipcs (1). +These files have headers and are formatted (one IPC object per line) +for easy understanding. +.BR ipc (5) +provides further background on the information shown by these files. +.TP +.I /proc/tty +Subdirectory containing the psuedo-files and subdirectories for +tty drivers and line disciplines. +.TP +.I /proc/uptime +This file contains two numbers: the uptime of the system (seconds), +and the amount of time spent in idle process (seconds). +.TP +.I /proc/version +This string identifies the kernel version that is currently running. +It includes the contents of /proc/sys/ostype, /proc/sys/osrelease and +/proc/sys/version. For example: +.nf +.in -2 +.ft CW +Linux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994 +.ft +.in +2 +.fi +.TP +.IR /proc/vmstat " (since Linux 2.6)" +This file displays various virtual memory statistics. + +.RE +.RE +.SH "SEE ALSO" +.BR cat (1), +.BR find (1), +.BR free (1), +.BR mount (1), +.BR ps (1), +.BR tr (1), +.BR uptime (1), +.BR chroot (2), +.BR mmap (2), +.BR readlink (2), +.BR syslog (2), +.BR slabinfo (5), +.BR hier (7), +.BR arp (8), +.BR dmesg (8), +.BR hdparm (8), +.BR ifconfig (8), +.BR init (8), +.BR lsmod (8), +.BR lspci (8), +.BR netstat (8), +.BR procinfo (8), +.BR route (8) +.br +.I /usr/src/linux/Documentation/filesystems/proc.txt +.SH CAVEATS +Note that many strings (i.e., the environment and command line) are in +the internal format, with sub-fields terminated by NUL bytes, so you +may find that things are more readable if you use \fIod -c\fP or \fItr +"\\000" "\\n"\fP to read them. +Alternatively, \fIecho `cat <file>`\fP works well. + +This manual page is incomplete, possibly inaccurate, and is the kind +of thing that needs to be updated very often. +.SH ACKNOWLEDGEMENTS +The material on /proc/sys/fs and /proc/sys/kernel is closely based on +kernel source documentation files written by Rik van Riel. diff --git a/man5/protocols.5 b/man5/protocols.5 new file mode 100644 index 000000000..645cc57ac --- /dev/null +++ b/man5/protocols.5 @@ -0,0 +1,82 @@ +.\" Copyright (c) 1995 Martin Schulze <joey@infodrom.north.de> +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" 1995-10-18 Martin Schulze <joey@infodrom.north.de> +.\" * first released +.\" 2002-09-22 Seth W. Klein <sk@sethwklein.net> +.\" * protocol numbers are now assigned by the IANA +.\" +.TH PROTOCOLS 5 2002-09-22 "Linux" "Linux Programmer's Manual" +.SH NAME +protocols \- the protocols definition file +.SH 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 since changes would result in incorrect ip +packages. Protocol numbers and names are specified by the IANA +(Internet Assigned Numbers Authority). +.\" .. by the DDN Network Information Center. + +Each line is of the following format: + +.RS +.I protocol number aliases ... +.RE + +where the fields are delimited by spaces or tabs. +Empty lines are ignored. +If a line contains a hash mark (#), the hash mark and the part +of the line following it are ignored. + +The field descriptions are: + +.TP +.I protocol +the native name for the protocol. For example ip, tcp, or udp. +.TP +.I number +the official number for this protocol as it will appear within the ip +header. +.TP +.I aliases +optional aliases for the protocol. +.LP + +This file might be distributed over a network using a networkwide +naming service like Yellow Pages/NIS or BIND/Hesiod. + +.SH FILES +.TP +.I /etc/protocols +The protocols definition file. +.SH "SEE ALSO" +.BR getprotoent (3) + +Guide to Yellow Pages Service + +Guide to BIND/Hesiod Service + +http://www.iana.org/assignments/protocol-numbers diff --git a/man5/resolv.conf.5 b/man5/resolv.conf.5 new file mode 100644 index 000000000..dac44f702 --- /dev/null +++ b/man5/resolv.conf.5 @@ -0,0 +1,195 @@ +.\" Copyright (c) 1986 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms are permitted +.\" provided that the above copyright notice and this paragraph are +.\" duplicated in all such forms and that any documentation, +.\" advertising materials, and other materials related to such +.\" distribution and use acknowledge that the software was developed +.\" by the University of California, Berkeley. The name of the +.\" University may not be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +.\" +.\" @(#)resolver.5 5.9 (Berkeley) 12/14/89 +.\" $Id: resolver.5,v 8.6 1999/05/21 00:01:02 vixie Exp $ +.\" +.\" Added ndots remark by Bernhard R. Link - debian bug #182886 +.\" +.TH RESOLV.CONF 5 2004-10-31 +.UC 4 +.SH NAME +resolv.conf \- resolver configuration file +.SH SYNOPSIS +/etc/resolv.conf +.SH DESCRIPTION +The +.I resolver +is a set of routines in the C library +that provide access to the Internet Domain Name System (DNS). +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. +.LP +On a normally configured system this file should not be necessary. +The only name server 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. +.LP +The different configuration options are: +.TP +\fBnameserver\fP Name server IP address +Internet address (in dot notation) of a name server +that the resolver should query. +Up to MAXNS (currently 3, see <resolv.h>) name servers may be listed, +one per keyword. +If there are multiple servers, +the resolver library queries them in the order listed. +If no \fBnameserver\fP entries are present, +the default is to use the name server on the local machine. +(The algorithm used is to try a name server, and if the query times out, +try the next, until out of name servers, +then repeat trying all the name servers +until a maximum number of retries are made.) +.TP +\fBdomain\fP Local domain name. +Most queries for names within this domain can use short names +relative to the local domain. +If no \fBdomain\fP entry is present, the domain is determined +from the local host name returned by +\fIgethostname\fP(); +the domain part is taken to be everything after the first `.'. +Finally, if the host name does not contain a domain part, the root +domain is assumed. +.TP +\fBsearch\fP Search list for host-name 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 \fIsearch\fP keyword with spaces or tabs separating +the names. +Resolver queries having fewer than +.I ndots +dots (default is 1) in them will be attempted using each component +of the search path in turn until a match is found. +For environments with multiple subdomains please read +.BI "options ndots:" n +below to avoid man-in-the-middle attacks and unnecessary +traffic for the root-dns-servers. +.\" When having a resolv.conv with a line +.\" search subdomain.domain.tld domain.tld +.\" and doing a hostlookup, for example by +.\" ping host.anothersubdomain +.\" it sends dns-requests for +.\" host.anothersubdomain. +.\" host.anothersubdomain.subdomain.domain.tld. +.\" host.anothersubdomain.domain.tld. +.\" thus not only causing unnecessary traffic for the root-dns-servers +.\" but broadcasting information to the outside and making man-in-the-middle +.\" attacks possible. +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. +.IP +The search list is currently limited to six domains +with a total of 256 characters. +.TP +\fBsortlist\fP +Sortlist allows addresses returned by gethostbyname to be sorted. +A sortlist 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. E.g., +.br +.in +2 +sortlist 130.155.160.0/255.255.240.0 130.155.0.0 +.in -2 +.br +.TP +\fBoptions\fP +Options allows certain internal resolver variables to be modified. +The syntax is +.RS +.IP +\fBoptions\fP \fIoption\fP \fI...\fP +.LP +where \fIoption\fP is one of the following: +.TP +\fBdebug\fP +sets RES_DEBUG in +.IR _res.options . +.TP +.BI ndots: n +sets a threshold for the number of dots which +must appear in a name given to \fBres_query\fP() (see +.BR resolver (3)) +before an \fIinitial absolute query\fP will be made. The default for +\fIn\fP is ``1'', meaning that if there are any dots in a name, the name +will be tried first as an absolute name before any \fIsearch list\fP +elements are appended to it. +.TP +.BI timeout: n +sets the amount of time the resolver will wait for a +response from a remote name server before retrying the +query via a different name server. Measured in seconds, +the default is RES_TIMEOUT (currently 5, see <resolv.h>). +.TP +.BI attempts: n +sets the number of times the resolver will send a +query to its name servers before giving up and returning +an error to the calling application. The default +is RES_DFLRETRY (currently 2, see <resolv.h>). +.TP +.B rotate +sets RES_ROTATE in +.IR _res.options , +which causes round robin selection of nameservers from among those listed. +This has the effect of spreading the query load among all listed servers, +rather than having all clients try the first listed server first every time. +.TP +.B no-check-names +sets RES_NOCHECKNAME in +.IR _res.options , +which disables the modern BIND checking of incoming host names and +mail names for invalid characters such as underscore (_), non-ASCII, +or control characters. +.TP +.B inet6 +sets RES_USE_INET6 in +.IR _res.options . +This has the effect of trying a AAAA query before an A query inside the +.IR gethostbyname () +function, and of mapping IPv4 responses in IPv6 ``tunnelled form'' +if no AAAA records are found but an A record set exists. +.RE +.LP +The \fIdomain\fP and \fIsearch\fP keywords are mutually exclusive. +If more than one instance of these keywords is present, +the last instance wins. +.LP +The \fIsearch\fP keyword of a system's \fIresolv.conf\fP file can be +overridden on a per-process basis by setting the environment variable +``\s-1LOCALDOMAIN\s+1'' to a space-separated list of search domains. +.LP +The \fIoptions\fP keyword of a system's \fIresolv.conf\fP file can be +amended on a per-process basis by setting the environment variable +``\s-1RES_OPTIONS\s+1'' to a space-separated list of resolver options +as explained above under \fBoptions\fP. +.LP +The keyword and value must appear on a single line, and the keyword +(e.g. \fBnameserver\fP) must start the line. The value follows +the keyword, separated by white space. +.SH FILES +.IR /etc/resolv.conf , +.I <resolv.h> +.SH "SEE ALSO" +.BR gethostbyname (3), +.BR resolver (3), +.BR hostname (7), +.BR named (8) +.br +Name Server Operations Guide for BIND diff --git a/man5/resolver.5 b/man5/resolver.5 new file mode 100644 index 000000000..86104b96c --- /dev/null +++ b/man5/resolver.5 @@ -0,0 +1 @@ +.so man5/resolv.conf.5 diff --git a/man5/rpc.5 b/man5/rpc.5 new file mode 100644 index 000000000..5150b56d7 --- /dev/null +++ b/man5/rpc.5 @@ -0,0 +1,74 @@ +.\" @(#)rpc.5 2.2 88/08/03 4.0 RPCSRC; from 1.4 87/11/27 SMI; +.TH RPC 5 1985-09-26 +.SH NAME +rpc \- rpc program number data base +.SH SYNOPSIS +.B /etc/rpc +.SH DESCRIPTION +The +.I rpc +file contains user readable names that +can be used in place of rpc program numbers. +Each line has the following information: +.HP 10 +name of server for the rpc program +.br +.ns +.HP 10 +rpc program number +.br +.ns +.HP 10 +aliases +.LP +Items are separated by any number of blanks and/or +tab characters. +A '#' indicates the beginning of a comment; characters from +the '#' to the end of the line are not interpreted by routines +which search the file. +.LP +Here is an example of the \fI/etc/rpc\fP file from the Sun RPC Source +distribution. +.nf +.ta 1.5i +0.5i +1.0i +1.0i +# +# rpc 88/08/01 4.0 RPCSRC; from 1.12 88/02/07 SMI +# +portmapper 100000 portmap sunrpc +rstatd 100001 rstat rstat_svc rup perfmeter +rusersd 100002 rusers +nfs 100003 nfsprog +ypserv 100004 ypprog +mountd 100005 mount showmount +ypbind 100007 +walld 100008 rwall shutdown +yppasswdd 100009 yppasswd +etherstatd 100010 etherstat +rquotad 100011 rquotaprog quota rquota +sprayd 100012 spray +3270_mapper 100013 +rje_mapper 100014 +selection_svc 100015 selnsvc +database_svc 100016 +rexd 100017 rex +alis 100018 +sched 100019 +llockmgr 100020 +nlockmgr 100021 +x25.inr 100022 +statmon 100023 +status 100024 +bootparam 100026 +ypupdated 100028 ypupdate +keyserv 100029 keyserver +tfsd 100037 +nsed 100038 +nsemntd 100039 +.fi +.DT +.SH FILES +.TP +.I /etc/rpc +rpc program number data base +.SH "SEE ALSO" +.BR getrpcent (3) diff --git a/man5/securetty.5 b/man5/securetty.5 new file mode 100644 index 000000000..7c710303f --- /dev/null +++ b/man5/securetty.5 @@ -0,0 +1,43 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993 +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified Sun Jul 25 11:06:27 1993 by Rik Faith (faith@cs.unc.edu) +.TH SECURETTY 5 1992-12-29 "Linux" "Linux Programmer's Manual" +.SH NAME +securetty \- file which lists ttys from which root can log in +.SH DESCRIPTION +The file +.I /etc/securetty +is used by (some versions of) +.BR login (1). +The file contains the device names of tty lines +(one per line, without leading +.IR /dev/ ) +on which root is allowed to login. +See +.BR login.defs (5) +if you use the shadow suite. +.SH FILES +.I /etc/securetty +.SH "SEE ALSO" +.BR login (1), +.BR login.defs (5) diff --git a/man5/services.5 b/man5/services.5 new file mode 100644 index 000000000..6a9a855d3 --- /dev/null +++ b/man5/services.5 @@ -0,0 +1,207 @@ +.\" Hey Emacs! This file is -*- nroff -*- source. +.\" +.\" This manpage is Copyright (C) 1996 Austin Donnelly <and1000@cam.ac.uk>, +.\" with additional material (c) 1995 Martin Schulze <joey@infodrom.north.de> +.\" +.\" 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. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" +.\" This manpage was made by merging two independently written manpages, +.\" one written by Martin Schulze (18 Oct 95), the other written by +.\" Austin Donnelly, (9 Jan 96). +.\" +.\" Thu Jan 11 12:14:41 1996 Austin Donnelly <and1000@cam.ac.uk> +.\" * Merged two services(5) manpages +.\" +.TH SERVICES 5 1996-01-11 "Linux" "Linux Programmer's Manual" +.SH NAME +services \- Internet network services list +.SH DESCRIPTION +.B 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 protocol) for its service. +The C library routines +.BR getservent (3), +.BR getservbyname (3), +.BR getservbyport (3), +.BR setservent (3), +and +.BR 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 +.BR bind (2), +.BR tcp (7), +and +.BR udp (7)). +This is so 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 +.B services +file does not necessarily mean that the service is currently running +on the machine. See +.BR inetd.conf (5) +for the configuration of Internet services offered. Note that not all +networking services are started by +.BR inetd (8), +and so won't appear in +.BR inetd.conf (5). +In particular, news (NNTP) and mail (SMTP) servers are often +initialized from the system boot scripts. + +The location of the +.B services +file is defined by +.B _PATH_SERVICES +in +.IR /usr/include/netdb.h "." +This is usually set to +.IR /etc/services "." + +Each line describes one service, and is of the form: +.IP +\f2service-name\ \ \ port\f3/\f2protocol\ \ \ \f1[\f2aliases ...\f1] +.TP +where: +.TP 10 +.I service-name +is the friendly name the service is known by and looked up under. It +is case sensitive. Often, the client program is named after the +.IR service-name "." +.TP +.I port +is the port number (in decimal) to use for this service. +.TP +.I protocol +is the type of protocol to be used. This field should match an entry +in the +.BR protocols (5) +file. Typical values include +.B tcp +and +.BR udp . +.TP +.I aliases +is an optional space or tab separated list of other names for this +service (but see the BUGS section below). Again, the names are case +sensitive. +.PP + +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 +.I service-name +should begin in the first column of the file, since leading spaces are +not stripped. +.I 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. E.g., 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 +.BR getservent (3), +.BR getservbyname (3), +and +.BR getservbyport (3). +However, this behaviour should not be relied on.) + +As a backwards compatibility feature, the slash (/) between the +.I port +number and +.I 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 like Yellow Pages/NIS or BIND/Hesiod. + +A sample +.B services +file might look like this: +.RS +.nf +.sp +.ta 3i +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 +.sp +.fi +.RE +.SH BUGS +There is a maximum of 35 aliases, due to the way the +.BR getservent (3) +code is written. + +Lines longer than +.B BUFSIZ +(currently 1024) characters will be ignored by +.BR getservent (3), +.BR getservbyname (3), +and +.BR getservbyport (3). +However, this will also cause the next line to be mis-parsed. +.SH FILES +.TP +.I /etc/services +The Internet network services list +.TP +.I /usr/include/netdb.h +Definition of +.B _PATH_SERVICES +.SH "SEE ALSO" +.BR listen (2), +.BR endservent (3), +.BR getservbyname (3), +.BR getservbyport (3), +.BR getservent (3), +.BR setservent (3), +.BR inetd.conf (5), +.BR protocols (5), +.BR inetd (8) + +Assigned Numbers RFC, most recently RFC 1700, (AKA STD0002) + +Guide to Yellow Pages Service + +Guide to BIND/Hesiod Service diff --git a/man5/shells.5 b/man5/shells.5 new file mode 100644 index 000000000..cd7d091cb --- /dev/null +++ b/man5/shells.5 @@ -0,0 +1,52 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Thu May 20 20:45:48 MET DST 1993 +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified Sat Jul 24 17:11:07 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Sun Nov 21 10:49:38 1993 by Michael Haardt +.\" Modified Sun Feb 26 15:09:15 1995 by Rik Faith (faith@cs.unc.edu) +.TH SHELLS 5 1993-11-21 "" "Linux Programmer's Manual" +.SH NAME +shells \- pathnames of valid login shells +.SH DESCRIPTION +.B /etc/shells +is a text file which contains the full pathnames of valid login shells. +This file is consulted by +.BR chsh (1) +and available to be queried by other programs. +.PP +Be aware that there are programs which consult this file to +find out if a user is a normal user. E.g.: ftp daemons traditionally +disallow access to users with shells not included in this file. +.SH EXAMPLES +.B /etc/shells +may contain the following paths: +.sp +.RS +.I /bin/sh +.br +.I /bin/csh +.RE +.SH FILES +.I /etc/shells +.SH "SEE ALSO" +.BR chsh (1), +.BR getusershell (3) diff --git a/man5/slabinfo.5 b/man5/slabinfo.5 new file mode 100644 index 000000000..ec53777fc --- /dev/null +++ b/man5/slabinfo.5 @@ -0,0 +1,111 @@ +.\" Copyright (c) 2001 Andreas Dilger (adilger@turbolinux.com) +.\" +.\" 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. +.\" +.\" Since the Linux kernel and libraries are constantly changing, this +.\" manual page may be incorrect or out-of-date. The author(s) assume no +.\" responsibility for errors or omissions, or for damages resulting from +.\" the use of the information contained herein. The author(s) may not +.\" have taken the same level of care in the production of this manual, +.\" which is licensed free of charge, as they might when working +.\" professionally. +.\" +.\" Formatted or processed versions of this manual, if unaccompanied by +.\" the source, must acknowledge the copyright and authors of this work. +.\" +.TH SLABINFO 5 2001-06-19 "" "Linux manual" +.SH NAME +/proc/slabinfo \- Kernel slab allocator statistics +.SH SYNOPSIS +.B cat /proc/slabinfo +.SH DESCRIPTION +Frequently used objects in the Linux kernel +(buffer heads, inodes, dentries, etc.) +have their own cache. The file +.I /proc/slabinfo +gives statistics. For example: +.LP +.RS +.nf +% cat /proc/slabinfo +slabinfo - version: 1.1 +kmem_cache 60 78 100 2 2 1 +blkdev_requests 5120 5120 96 128 128 1 +mnt_cache 20 40 96 1 1 1 +inode_cache 7005 14792 480 1598 1849 1 +dentry_cache 5469 5880 128 183 196 1 +filp 726 760 96 19 19 1 +buffer_head 67131 71240 96 1776 1781 1 +vm_area_struct 1204 1652 64 23 28 1 +\&... +size-8192 1 17 8192 1 17 2 +size-4096 41 73 4096 41 73 1 +\&... +.fi +.RE +.LP +For each slab cache, the cache name, the number of currently +active objects, the total number of available objects, the +size of each object in bytes, the number of pages with at +least one active object, the total number of allocated pages, +and the number of pages per slab are given. + +Note that because of object alignment and slab cache overhead, +objects are not normally packed tightly into pages. Pages with +even one in-use object are considered in-use and cannot be +freed. + +Kernels compiled with slab cache statistics will also have +"(statistics)" in the first line of output, and will have 5 +additional columns, namely: the high water mark of active +objects; the number of times objects have been allocated; +the number of times the cache has grown (new pages added +to this cache); the number of times the cache has been +reaped (unused pages removed from this cache); and the +number of times there was an error allocating new pages +to this cache. If slab cache statistics are not enabled +for this kernel, these columns will not be shown. + +SMP systems will also have "(SMP)" in the first line of +output, and will have two additional columns for each slab, +reporting the slab allocation policy for the CPU-local +cache (to reduce the need for inter-CPU synchronization +when allocating objects from the cache). The first column +is the per-CPU limit: the maximum number of objects that +will be cached for each CPU. The second column is the +batchcount: the maximum number of free objects in the +global cache that will be transferred to the per-CPU cache +if it is empty, or the number of objects to be returned +to the global cache if the per-CPU cache is full. + +If both slab cache statistics and SMP are defined, there +will be four additional columns, reporting the per-CPU +cache statistics. The first two are the per-CPU cache +allocation hit and miss counts: the number of times an +object was or was not available in the per-CPU cache +for allocation. The next two are the per-CPU cache free +hit and miss counts: the number of times a freed object +could or could not fit within the per-CPU cache limit, +before flushing objects to the global cache. + +It is possible to tune the SMP per-CPU slab cache limit +and batchcount via: + +.nf +echo "\fIcache_name limit batchcount\fP" > /proc/slabinfo +.fi + +.SH AVAILABILITY +.I /proc/slabinfo +exists since Linux 2.1.23. +SMP per-CPU caches exist since Linux 2.4.0-test3. + +.SH FILES +.I <linux/slab.h> diff --git a/man5/termcap.5 b/man5/termcap.5 new file mode 100644 index 000000000..a330f8b86 --- /dev/null +++ b/man5/termcap.5 @@ -0,0 +1,451 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993 +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified formatting Sat Jul 24 17:13:38 1993, Rik Faith (faith@cs.unc.edu) +.\" Modified (extensions and corrections) Sun May 1 14:21:25 MET DST 1994 Michael Haardt +.\" If mistakes in the capabilities are found, please send a bug report to: +.\" michael@moria.de +.\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond (esr@thyrsus.com) +.TH TERMCAP 5 "" "Linux" "Linux Programmer's Manual" +.SH NAME +termcap \- terminal capability database +.SH 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 +.BR terminfo (5) +database and associated libraries. +.LP +.B /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. +.LP +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 '|'. +.LP +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.4BSD termcap +entries this field is omitted. +.LP +The second subfield (first, in the newer 4.4BSD 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. See below for an +example. 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. +.LP +Subsequent fields contain the terminal capabilities; any continued +capability lines must be indented one tab from the left margin. +.LP +Although there is no defined order, it is suggested to write first +boolean, then numeric, and then string capabilities, each sorted +alphabetically without looking at lower or upper spelling. Capabilities +of similar functions can be written in one line. +.LP +.nf +Example for: +.sp +Head line: vt|vt101|DEC VT 101 terminal in 80 character mode:\e +Head line: Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\e +Boolean: :bs:\e +Numeric: :co#80:\e +String: :sr=\eE[H:\e +.SS "Boolean Capabilities" +.nf +5i Printer will not echo on screen +am Automatic margins which means automatic line wrap +bs Control-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 can not 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 can not overstrike +xb Beehive glitch, f1 sends ESCAPE, 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 +.fi +.SS "Numeric Capabilities" +.nf +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 new line 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 +li Number of lines +Nl Number of soft labels +pb Lowest baud rate which needs padding +sg Standout glitch +ug Underline glitch +vt virtual terminal number +ws Width of status line if different from screen width +.fi +.SS "String Capabilities" +.nf +!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 cusor right key +%j shifted resume key +&0 shifted cancel key +&1 reference key +&2 refresh key +&3 replace key +&4 restart key +&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 Indert %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) +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 +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 scolling forward/down +kh Cursor home key +kH Cursor hown 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 scolling backward/up +ks Turn keypad on +kS Clear to end of screen key +kt Clear this tab key +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 mode like 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 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 +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 unvisible +vs Standout cursor +wi Set window from line %1 to %2 and column %3 to %4 +XF XOFF character if not ^S +.fi +.LP +There are several ways of defining the control codes for string capabilities: +.LP +Normal Characters except '^','\e' and '%' repesent themself. +.LP +A '^x' means Control-x. Control-A equals 1 decimal. +.LP +\ex means a special code. x can be one of the following charaters: +.RS +E Escape (27) +.br +n Linefeed (10) +.br +r Carriage return (13) +.br +t Tabulation (9) +.br +b Backspace (8) +.br +f Form feed (12) +.br +0 Null character. A \exxx specifies the octal character xxx. +.RE +.IP i +Increments paramters by one. +.IP r +Single parameter capability +.IP + +Add value of next character to this parameter and do binary output +.IP 2 +Do ASCII output of this parameter with a field with of 2 +.IP d +Do ASCII output of this parameter with a field with of 3 +.IP % +Print a '%' +.LP +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. +.IP Warning: +The above metacharacters for parameters may be wrong, they document Minix +termcap which may not be compatible with Linux termcap. +.LP +The block graphic characters can be specified by three string capabilities: +.IP as +start the alternative charset +.IP ae +end it +.IP ac +pairs of characters. The first character is the name of the block graphic +symbol and the second characters is its definition. +.LP +The following names are available: +.sp +.nf ++ 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 (???) +.fi +.sp +The values in parentheses are suggested defaults which are used by curses, +if the capabilities are missing. +.SH "SEE ALSO" +.BR curses (3), +.BR termcap (3), +.BR terminfo (5) diff --git a/man5/ttytype.5 b/man5/ttytype.5 new file mode 100644 index 000000000..096274ab1 --- /dev/null +++ b/man5/ttytype.5 @@ -0,0 +1,64 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de), Fri Apr 2 11:32:09 MET DST 1993 +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified Sat Jul 24 17:17:50 1993 by Rik Faith <faith@cs.unc.edu> +.\" Modified Thu Oct 19 21:25:21 MET 1995 by Martin Schulze <joey@infodrom.north.de> +.\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond +.\" <esr@thyrsus.com>xk +.TH TTYTYPE 5 1993-07-24 "Linux" "Linux Programmer's Manual" +.SH NAME +ttytype \- terminal device to default terminal type mapping +.SH DESCRIPTION +The +.I /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 +.IR /dev/ ") prefix." + +This association is used by the program +.BR 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. +.SH EXAMPLE +A typical +.I /etc/ttytype +is: +.RS +.sp +con80x25 tty1 +.br +vt320 ttys0 +.sp +.RE +.SH FILES +.TP +.I /etc/ttytype +the tty definitions file. +.SH "SEE ALSO" +.BR getty (1), +.BR termcap (5), +.BR terminfo (5) diff --git a/man5/tzfile.5 b/man5/tzfile.5 new file mode 100644 index 000000000..91f67ef4d --- /dev/null +++ b/man5/tzfile.5 @@ -0,0 +1,138 @@ +.\" @(#)tzfile.5 7.11 +.\" This file is in the public domain, so clarified as of +.\" 1996-06-05 by Arthur David Olson <arthur_david_olson@nih.gov>. +.TH TZFILE 5 +.SH NAME +tzfile \- time zone information +.SH SYNOPSIS +.B +#include <tzfile.h> +.SH DESCRIPTION +The time zone information files used by +.BR tzset (3) +begin with the magic characters "TZif" to identify then as +time zone information files, +followed by sixteen bytes reserved for future use, +followed by six four-byte values of type +.BR long , +written in a ``standard'' byte order +(the high-order byte of the value is written first). +These values are, +in order: +.TP +.I tzh_ttisgmtcnt +The number of UTC/local indicators stored in the file. +.TP +.I tzh_ttisstdcnt +The number of standard/wall indicators stored in the file. +.TP +.I tzh_leapcnt +The number of leap seconds for which data is stored in the file. +.TP +.I tzh_timecnt +The number of "transition times" for which data is stored +in the file. +.TP +.I tzh_typecnt +The number of "local time types" for which data is stored +in the file (must not be zero). +.TP +.I tzh_charcnt +The number of characters of "time zone abbreviation strings" +stored in the file. +.PP +The above header is followed by +.I tzh_timecnt +four-byte values of type +.BR long , +sorted in ascending order. +These values are written in ``standard'' byte order. +Each is used as a transition time (as returned by +.BR time (2)) +at which the rules for computing local time change. +Next come +.I tzh_timecnt +one-byte values of type +.BR "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 +.I ttinfo +structures that appears next in the file; +these structures are defined as follows: +.in +.5i +.sp +.nf +.ta .5i +\w'unsigned int\0\0'u +struct ttinfo { + long tt_gmtoff; + int tt_isdst; + unsigned int tt_abbrind; +}; +.in -.5i +.fi +.sp +Each structure is written as a four-byte value for +.I tt_gmtoff +of type +.BR long , +in a standard byte order, followed by a one-byte value for +.I tt_isdst +and a one-byte value for +.IR tt_abbrind . +In each structure, +.I tt_gmtoff +gives the number of seconds to be added to UTC, +.I tt_isdst +tells whether +.I tm_isdst +should be set by +.BR localtime (3), +and +.I tt_abbrind +serves as an index into the array of time zone abbreviation characters +that follow the +.I ttinfo +structure(s) in the file. +.PP +Then there are +.I tzh_leapcnt +pairs of four-byte values, written in standard byte order; +the first value of each pair gives the time +(as returned by +.BR time (2)) +at which a leap second occurs; +the second gives the +.I total +number of leap seconds to be applied after the given time. +The pairs of values are sorted in ascending order by time. +.PP +Then there are +.I 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. +.PP +Finally, there are +.I tzh_ttisgmtcnt +UTC/local indicators, each stored as a one-byte value; +they tell whether the transition times associated with local time types +were specified as UTC or local time, +and are used when a time zone file is used in handling POSIX-style +time zone environment variables. +.PP +.I Localtime +uses the first standard-time +.I ttinfo +structure in the file +(or simply the first +.I ttinfo +structure in the absence of a standard-time structure) +if either +.I tzh_timecnt +is zero or the time argument is less than the first transition time recorded +in the file. +.\" .SH "SEE ALSO" +.\" .BR newctime (3) diff --git a/man5/utmp.5 b/man5/utmp.5 new file mode 100644 index 000000000..576e72c68 --- /dev/null +++ b/man5/utmp.5 @@ -0,0 +1,242 @@ +.\" Copyright (c) 1993 Michael Haardt (michael@cantor.informatik.rwth-aachen.de), Fri Apr 2 11:32:09 MET DST 1993 +.\" +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, write to the Free +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, +.\" USA. +.\" +.\" Modified 1993-07-25 by Rik Faith (faith@cs.unc.edu) +.\" Modified 1995-02-26 by Michael Haardt +.\" Modified 1996-07-20 by Michael Haardt +.\" Modified 1997-07-02 by Nicolás Lichtmaier <nick@debian.org> +.\" Modified 2004-10-31 by aeb, following Gwenole Beauchesne +.TH UTMP 5 2004-10-31 "File formats" "Linux Programmer's Manual" +.SH NAME +utmp, wtmp \- login records +.SH SYNOPSIS +#include <utmp.h> +.SH DESCRIPTION +The +.I utmp +file allows one 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. +.PP +.B Warning: +.I utmp +must not be writable, because many system programs (foolishly) +depend on its integrity. You risk faked system logfiles and +modifications of system files if you leave +.I utmp +writable to any user. +.PP +The file is a sequence of entries with the following structure declared +in the include file (note that this is only one of several definitions +around; details depend on the version of libc): +.in +3 +.nf +.sp +.ta 3i +#define UT_UNKNOWN 0 +#define RUN_LVL 1 +#define BOOT_TIME 2 +#define NEW_TIME 3 +#define OLD_TIME 4 +#define INIT_PROCESS 5 +#define LOGIN_PROCESS 6 +#define USER_PROCESS 7 +#define DEAD_PROCESS 8 +#define ACCOUNTING 9 + +#define UT_LINESIZE 12 +#define UT_NAMESIZE 32 +#define UT_HOSTSIZE 256 + +struct exit_status { + short int e_termination; /* process termination status. */ + short int e_exit; /* process exit status. */ +}; + +struct utmp { + short ut_type; /* type of login */ + pid_t ut_pid; /* pid of login process */ + char ut_line[UT_LINESIZE]; /* device name of tty \- "/dev/" */ + char ut_id[4]; /* init id or abbrev. ttyname */ + char ut_user[UT_NAMESIZE]; /* user name */ + char ut_host[UT_HOSTSIZE]; /* hostname for remote login */ + struct exit_status ut_exit; /* The exit status of a process + marked as DEAD_PROCESS. */ + long ut_session; /* session ID, used for windowing*/ + struct timeval ut_tv; /* time entry was made. */ + int32_t ut_addr_v6[4]; /* IP address of remote host. */ + char __unused[20]; /* Reserved for future use. */ +}; + +/* Backwards compatibility hacks. */ +#define ut_name ut_user +#ifndef _NO_UT_TIME +#define ut_time ut_tv.tv_sec +#endif +#define ut_xtime ut_tv.tv_sec +#define ut_addr ut_addr_v6[0] +.sp +.fi +.in +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 +.BR time (2). +String fields are terminated by \fB'\e0'\fP if they are shorter than the size +of the field. +.PP +The first entries ever created result from +.BR init (8) +processing +.BR inittab (5). +Before an entry is processed, though, +.BR init (8) +cleans up utmp by setting \fIut_type\fP to \fBDEAD_PROCESS\fP, clearing +\fIut_user\fP, \fIut_host\fP, and \fIut_time\fP with null bytes for each +record which \fIut_type\fP is not \fBDEAD_PROCESS\fP or \fBRUN_LVL\fP +and where no process with PID \fIut_pid\fP exists. If no empty record +with the needed \fIut_id\fP can be found, init creates a new one. It +sets \fIut_id\fP from the inittab, \fIut_pid\fP and \fIut_time\fP to the +current values, and \fIut_type\fP to \fBINIT_PROCESS\fP. +.PP +.BR getty (8) +locates the entry by the pid, changes \fIut_type\fP to +\fBLOGIN_PROCESS\fP, changes \fIut_time\fP, sets \fIut_line\fP, and waits +for connection to be established. +.BR login (8), +after a user has been +authenticated, changes \fIut_type\fP to \fBUSER_PROCESS\fP, changes +\fIut_time\fP, and sets \fIut_host\fP and \fIut_addr\fP. Depending on +.BR getty (8) +and +.BR login (8), +records may be located by +\fIut_line\fP instead of the preferable \fIut_pid\fP. +.PP +When +.BR init (8) +finds that a process has exited, it locates its utmp +entry by \fIut_pid\fP, sets \fIut_type\fP to \fBDEAD_PROCESS\fP, and +clears \fIut_user\fP, \fIut_host\fP and \fIut_time\fP with null bytes. +.PP +.BR xterm (1) +and other terminal emulators directly create a +\fBUSER_PROCESS\fP record and generate the \fIut_id\fP by using the last +two letters of \fI/dev/ttyp\fP\fI%c\fP or by using \fIp\fP\fI%d\fP for +\fI/dev/pts/\fP\fI%d\fP. If they find a \fBDEAD_PROCESS\fP for this id, +they recycle it, otherwise they create a new entry. If they can, they +will mark it as \fBDEAD_PROCESS\fP on exiting and it is advised that +they null \fIut_line\fP, \fIut_time\fP, \fIut_user\fP, and \fIut_host\fP +as well. +.PP +\fIxdm\fP(8) should not create a utmp record, because there is no +assigned terminal. Letting it create one will result in errors, such +as 'finger: cannot stat /dev/machine.dom'. It should create wtmp entries, +though, just like +.BR ftpd (8) +does. +.PP +.BR telnetd (8) +sets up a \fBLOGIN_PROCESS\fP entry and leaves the rest to +.BR login (8) +as usual. After the telnet session ends, +.BR telnetd (8) +cleans up utmp in the described way. +.PP +The \fIwtmp\fP file records all logins and logouts. Its format is +exactly like \fIutmp\fP except that a null user name indicates a logout +on the associated terminal. Furthermore, the terminal name \fB~\fP +with user name \fBshutdown\fP or \fBreboot\fP indicates a system +shutdown or reboot and the pair of terminal names \fB|\fP/\fB}\fP +logs the old/new system time when +.BR date (1) +changes it. \fIwtmp\fP is maintained by +.BR login (1), +.BR init (1), +and some versions of +.BR getty (1). +Neither of these programs creates the file, so if it is +removed, record-keeping is turned off. +.SH FILES +/var/run/utmp +.br +/var/log/wtmp +.SH "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 +\fIut_type\fP, which causes native v7/BSD-like programs to display (for +example) dead or login entries. Further, there is no configuration file +which allocates slots to sessions. BSD does so because it lacks +\fIut_id\fP fields. In Linux (as in SYSV), the \fIut_id\fP field of a +record will never change once it has been set, which reserves that slot +without needing a configuration file. Clearing \fIut_id\fP may result +in race conditions leading to corrupted utmp entries and and potential +security holes. Clearing the above mentioned fields by filling them +with null bytes is not required by SYSV semantics, but it allows to run +many programs which assume BSD semantics and which do not modify utmp. +Linux uses the BSD conventions for line contents, as documented above. +.PP +SYSV only uses the type field to mark them and logs informative messages +such as e.g.\& \fB"new time"\fP in the line field. \fBUT_UNKNOWN\fP seems +to be a Linux invention. +SYSV has no \fIut_host\fP or \fIut_addr_v6\fP fields. +.PP +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 \fIwho\fP(1) then +do not make utmp world readable. +.PP +Note that the utmp struct from libc5 has changed in libc6. Because of this, +binaries using the old libc5 struct will corrupt +.IR /var/run/utmp " and/or " /var/log/wtmp . +Debian systems include a patched libc5 which uses the new utmp format. +The problem still exists with wtmp since it's accessed directly in +libc5. +.SH RESTRICTIONS +The file format is machine dependent, so it is recommended that it be +processed only on the machine architecture where it was created. +.PP +Note that on platforms which can run both 32-bit and 64-bit applications +(x86-64, ppc64, s390x, etc.), the sizes of the fields of a struct utmp +must be the same in 32-bit mode as in 64-bit mode. +This is achieved by changing the type of +.I ut_session +to int32_t, and that of +.I ut_tv +to a struct with two int32_t fields +.I tv_sec +and +.IR tv_usec . +(Thus, in order to fill it, first get the time into a real struct timeval, +then copy the two fields to +.IR ut_tv .) +.SH BUGS +This manpage is based on the libc5 one, things may work differently now. +.SH "SEE ALSO" +.BR ac (1), +.BR date (1), +.BR last (1), +.BR login (1), +.BR who (1), +.BR getutent (3), +.BR updwtmp (3), +.BR init (8) diff --git a/man5/wtmp.5 b/man5/wtmp.5 new file mode 100644 index 000000000..1fa9e5a5d --- /dev/null +++ b/man5/wtmp.5 @@ -0,0 +1 @@ +.so man5/utmp.5 |