• Aucun résultat trouvé

Process Handlers

Dans le document Linux Security (Page 101-106)

The /bindirectory contains utilities to manage various processes. Some of these utilities are these:

kill. This terminates a process.

nice. This runs a program with modified scheduling priority.

ps. This reports process status.

/etc (System Configuration)

The /etcdirectory contains the configuration files of various programs. Some of the configfiles in the /etcdirectory are listed here:

X11/. This is the X Windows configdirectory.

aliases. This is the aliases file for sendmail.

bashrc. This file contains system-wide functions and aliases for bash.

crontab. This file contains tables for driving crond.

csh.cshrc. This file contains systemwide functions for cshusers.

exports. This file contains information about the NFS file systems being exported.

fstab. This file contains the static file system information.

group. This file is the user group file.

hosts. This file contains the list of known hosts to shortcut nameserver lookups.

hosts.allow, hosts.deny. These files are access control files for network operations.

inetd.conf. This is the configfile for inetd.

inittab. This file is the configfile for init.

ld.so.conf. This file contains the list of library directories for ldconfig to check.

lilo.conf. This is the lilo configfile.

motd. This file contains message of the day.

passwd. This file contains information about the system password.

profile. This file contains the systemwide environment setup.

resolv.conf. This file is the hostname resolver configuration file.

services. This file contains the network services list.

skel/. This is the skeleton directory for adding new users.

sysconfig/. This directory contains (RedHat) additional system

configfiles.

/proc (Linux Profiling & Tuning)

The /procdirectory is an interface to the kernel data structures. Most of the files in this pseudo file system are read-only. This directory contains subdirectories representing the running processes on the system. Each of these subdirectory is named by the process ID of the process that it represents. Each subdirectory con-tains these files and subdirectories:

cmdline. This holds the command line for the process.

cwd. This is a link to the current working directory of the process.

environ. This contains the process environment.

exe. This is a link to the binary that is executed.

fd. This is a subdirectory containing one entry for each file that the process has opened. The entry is named by its file descriptor and is a symbolic link to the actual file.

maps. This is a file that contains the currently mapped memory regions and their access permissions.

mem. The memfile points to the memory of the process that accesses it.

stat. This contains the status information about the process.

Other files and directories in /procinclude:

cpuinfo. This is a collection of CPU and items that are dependent on system architecture. The only two common entries are CPU and

BogoMIPS. CPU shows the CPUs that are currently in use. BogoMIPS is a system constant, which is calculated during kernel initialization.

devices. This is a text listing of major numbers and device groups.

dma. This is a list of registered ISA Direct Memory Access (DMA) channels in use.

filesystems. This is a text listing of the different file system types that were compiled in the kernel.

interrupts. This is used to record the number of interrupts per IRQ on the i386 architecture.

ioports. This is a list of currently registered Input-Output port regions that are in use.

kcore. This file represents the physical memory of the system.

kmsg. This file can be used instead of the syslog system call to log kernel messages.

ksyms. This file holds the symbol definitions used by modules(x) tools.

loadavg. This gives the number of jobs in the run queue averaged over 1, 5, and 15 minutes. This number is the same as the load average numbers given by uptimeand other programs.

meminfo. This is used by freeto report the amount of free and used physical and swap memory on the system. It also reports the amount of shared memory and buffers used by the kernel.

modules. This is a text list of the modules that have been loaded by the system.

net/. This contains various net pseudo-files that give the status of some part of the networking layer.

pci. This is a listing of all PCI devices found during kernel initialization and their configuration.

scsi/. This is a directory of the SCSI mid-level pseudo-file and various SCSI low-level driver directories that give the status of some part of the SCSI IO subsystem. The SCSI low-level directories contain a file for each SCSI host in this system. These files contain ASCII structures and also are readable with cat. You also can write to some of the files to reconfigure the subsystem or switch certain features on or off.

self. This directory refers to the process that accesses the /procfile sys-tem. It is identical to the /procdirectory, named by the process ID of the same process.

stat. This contains kernel and/or system statistics.

sys/. This directory contains files and subdirectories corresponding to kernel variables. These variables can be read and modified by using the

/procfile system.

version. This file identifies the current kernel version.

/tmp (Temporary Storage)

If you are uncompressing an application, but the combined size of the zip file and the uncompressed data is too large for your file system, you need some scratch space for storing the temporary data. The /tmpdirectory is meant to be used as

temporary storage space. It is usually deleted to keep the system clean. Therefore, you should not leave important files in this directory because its contents are highly variable.

/var (Variable File Storage)

The /vardirectory holds files that are variable in size, time, or content. It is usu-ally split into other directories, based on the kind of files in those directories. The other directories may include the following:

catman. This directory contains subdirectories with preformatted manual pages.

games. This directory stores games-related files.

lib. This directory is used for storing information about various applica-tions. The locateutility stores its lookup table here.

lock. The programs that need temporarily to lock files put the files here.

log. This directory stores system logs.

run. Various processes ids and other miscellaneous information are stored here.

spool. This directory contains spools for various applications, each of which has its own subdirectory. The most common programs that spool files are mailand lpd.

tmp. This directory stores temporary information about the running programs.

/root and /home/user (Home Directories)

The /rootdirectory is the home directory for the super user root. It usually con-tains files and tools that concern system administrative tasks. This directory has read privileges only for the root user and other administrative accounts. Each user has a username and a directory in /home. The users can place any kind of files here and set up permissions to determine exactly to whom they want to allow access to their data.

/mnt (Temporary Mount Point)

The /mntdirectory is a temporary mountpoint. Sometimes, it has subdirectories for different types of file systems.

Dans le document Linux Security (Page 101-106)