Skip to content

Commit ef23991

Browse files
author
Vladimir Kotal
committed
move filesystem header slide to appendix
1 parent 1d52940 commit ef23991

File tree

2 files changed

+70
-68
lines changed

2 files changed

+70
-68
lines changed

files.tex

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,70 @@
33

44
%%%%%
55

6+
\pdfbookmark[1]{file system}{filesys}
7+
8+
\begin{slide}
9+
\sltitle{File system}
10+
\setlength{\baselineskip}{0.8\baselineskip}
11+
\begin{itemize}
12+
\item directories form a tree and together with files form an acyclic graph
13+
(one file can have multiple references).
14+
\item each directory also contains reference to itself '\texttt{.}'
15+
(dot) and to its parent directory '\texttt{..}' (two dots).
16+
\item using file system interfaces, it is possible to access other system
17+
entities such as:
18+
\begin{itemize2}
19+
\setlength{\itemsep}{-3pt}
20+
\setlength{\topsep}{0pt}
21+
\item peripheral devices
22+
\item named pipes
23+
\item sockets
24+
\item processes (\texttt{/proc})
25+
\item memory (\texttt{/dev/mem}, \texttt{/dev/kmem})
26+
\item pseudo files (\texttt{/dev/tty}, \texttt{/dev/fd/0},\dots)
27+
\end{itemize2}
28+
\item from the kernel's perspective, each regular file is an array of bytes.
29+
\item all (including network) drives are connected to single tree.
30+
\end{itemize}
31+
\end{slide}
32+
33+
\label{DEVFS}
34+
35+
\begin{itemize}
36+
\item Devices, files in \texttt{/proc}, terminals, memory etc. are of one type
37+
- special files. More types: regular file (hardlink), directory, named pipe,
38+
socket, symbolic link.
39+
\item A newly created directory has 2 references to itself -- one from its parent
40+
directory and one of itself, '\texttt{.}':
41+
42+
\begin{verbatim}
43+
$ mkdir test
44+
$ ls -ld test
45+
drwx------ 2 janp staff 512 Mar 23 12:46 test
46+
\end{verbatim}
47+
48+
\item The root user can in some systems, create a cycle in a directory structure.
49+
However that might confuse file system traversal tools, hence the cyclical
50+
structure is not used much. Symbolic links to directories work everywhere.
51+
\item Named pipes (see page \pageref{MKFIFO}) can be used between processes
52+
that do not have a ''family'' relationship. They work as unnamed pipes otherwise.
53+
\item The sockets noted above are in the UNIX domain, i.e. they are used for
54+
communication within one system. The INET domain sockets, used for network
55+
communication (see page \pageref{NETWORKING}) are not visible in the file
56+
system.
57+
\item Debuggers use process images available through \texttt{/proc}.
58+
On many Unix-like systems, the \texttt{/proc} tree contains information about
59+
kernel and running processes in the form of text files. However, some systems
60+
like Solaris, have those files in a binary form only and provide special
61+
commands to read those (like \texttt{pargs}, \texttt{pldd}, etc.).
62+
\item Modern Unix systems contain a special \emph{\texttt{devfs}} filesystem
63+
that reflects an actual system configuration w.r.t. connected devices. E.g.
64+
after connecting a USB stick, a related device will appear under \texttt{/dev}.
65+
After physically disconnecting it, the item will disappear.
66+
\end{itemize}
67+
68+
%%%%%
69+
670
\begin{slide}
771
\sltitle{Hierarchical file system}
872
\begin{center}

user-access.tex

Lines changed: 6 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@
453453
\end{slide}
454454

455455
\begin{itemize}
456-
\item W.r.t. setting the UID for a process with EUID == 0, see also the notes on page
457-
\pageref{ROOT_SETUID}.
456+
\item W.r.t. setting the UID for a process with EUID == 0, see also the notes on
457+
page \pageref{ROOT_SETUID}.
458458
\item To recap the above: a process with effective rights of a superuser can
459459
arbitrarily change its identity. The rest can only switch between its real and
460460
effective IDs.
@@ -467,73 +467,11 @@
467467
\item \texttt{setgroups} is not part of UNIX~98 or UNIX~03.
468468
\item RUID/EUID are saved in the kernel process structure and also in the so
469469
called \emph{u-area} (see e.g. [Bach]).
470-
\item If a root SUID program calls \texttt{setuid} for a UID other than 0, it can
471-
no longer return the EUID to 0 (this makes sense, imagine a user logging into the
472-
system). For a different behavior, \texttt{seteuid} (that sets just the EUID) would
473-
have to be used.
470+
\item If a root SUID program calls \texttt{setuid} for a UID other than 0, it
471+
can no longer return the EUID to 0 (this makes sense, imagine a user logging
472+
into the system). For a different behavior, \texttt{seteuid} (that sets just the
473+
EUID) would have to be used.
474474
\item Example: \example{setuid/screate-file.c}
475475
\end{itemize}
476476

477-
\pdfbookmark[1]{file system}{filesys}
478-
479-
\begin{slide}
480-
\sltitle{File system}
481-
\setlength{\baselineskip}{0.8\baselineskip}
482-
\begin{itemize}
483-
\item directories form a tree and together with files form an acyclic graph
484-
(one file can have multiple references).
485-
\item each directory also contains reference to itself '\texttt{.}'
486-
(dot) and to its parent directory '\texttt{..}' (two dots).
487-
\item using file system interfaces, it is possible to access other system
488-
entities such as:
489-
\begin{itemize2}
490-
\setlength{\itemsep}{-3pt}
491-
\setlength{\topsep}{0pt}
492-
\item peripheral devices
493-
\item named pipes
494-
\item sockets
495-
\item processes (\texttt{/proc})
496-
\item memory (\texttt{/dev/mem}, \texttt{/dev/kmem})
497-
\item pseudo files (\texttt{/dev/tty}, \texttt{/dev/fd/0},\dots)
498-
\end{itemize2}
499-
\item from the kernel's perspective, each regular file is an array of bytes.
500-
\item all (including network) drives are connected to single tree.
501-
\end{itemize}
502-
\end{slide}
503-
504-
\label{DEVFS}
505-
506-
\begin{itemize}
507-
\item Devices, files in \texttt{/proc}, terminals, memory etc. are of one type
508-
- special files. More types: regular file (hardlink), directory, named pipe,
509-
socket, symbolic link.
510-
\item A newly created directory has 2 references to itself -- one from its parent
511-
directory and one of itself, '\texttt{.}':
512-
513-
\begin{verbatim}
514-
$ mkdir test
515-
$ ls -ld test
516-
drwx------ 2 janp staff 512 Mar 23 12:46 test
517-
\end{verbatim}
518-
519-
\item The root user can in some systems, create a cycle in a directory structure.
520-
However that might confuse file system traversal tools, hence the cyclical
521-
structure is not used much. Symbolic links to directories work everywhere.
522-
\item Named pipes (see page \pageref{MKFIFO}) can be used between processes
523-
that do not have a ''family'' relationship. They work as unnamed pipes otherwise.
524-
\item The sockets noted above are in the UNIX domain, i.e. they are used for
525-
communication within one system. The INET domain sockets, used for network
526-
communication (see page \pageref{NETWORKING}) are not visible in the file
527-
system.
528-
\item Debuggers use process images available through \texttt{/proc}.
529-
On many Unix-like systems, the \texttt{/proc} tree contains information about
530-
kernel and running processes in the form of text files. However, some systems
531-
like Solaris, have those files in a binary form only and provide special
532-
commands to read those (like \texttt{pargs}, \texttt{pldd}, etc.).
533-
\item Modern Unix systems contain a special \emph{\texttt{devfs}} filesystem
534-
that reflects an actual system configuration w.r.t. connected devices. E.g.
535-
after connecting a USB stick, a related device will appear under \texttt{/dev}.
536-
After physically disconnecting it, the item will disappear.
537-
\end{itemize}
538-
539477
\endinput

0 commit comments

Comments
 (0)