|
38 | 38 | representation of users and groups. |
39 | 39 | \item Passwords are long gone from \texttt{/etc/passwd}, they are stored some |
40 | 40 | place else, for example in \texttt{/etc/shadow}, which is not readable to an |
41 | | -uprivileged user. The passwords are also salted and then hashed. On BSD based |
| 41 | +unprivileged user. The passwords are also salted and then hashed. On BSD based |
42 | 42 | systems, eg. FreeBSD or macOS, instead of \texttt{/etc/shadow}, |
43 | 43 | \texttt{/etc/master.passwd} database is used. |
44 | 44 | \item If \texttt{/etc/shadow} does exist, it is structured in a similar way as |
|
203 | 203 | \item this identification is inherited by each process |
204 | 204 | \item file $F$ has owner ($UID_F$) and group owner ($GID_F$). |
205 | 205 | \item algorithm for evaluation of access rights for process: |
206 | | -$P(UID_P,GID_P,SUPG)$ and file $F(UID_F,GID_F)$: |
| 206 | +ifdef([[[NOSPELLCHECK]]], [[[$P(UID_P,GID_P,SUPG)$]]]) and file |
| 207 | +ifdef([[[NOSPELLCHECK]]], [[[$F(UID_F,GID_F)$]]]): |
207 | 208 | \begin{tabular}{ll} |
208 | | -If & then $P$rocess has w.r.t. $F$ile \\ |
| 209 | +If & then ifdef([[[NOSPELLCHECK]]], [[[$P$rocess]]]) has w.r.t. |
| 210 | +ifdef([[[NOSPELLCHECK]]], [[[$F$ile]]]) \\ |
209 | 211 | \hline |
210 | 212 | \texttt{if($UID_P$ == 0)} & \dots{} all rights \\ |
211 | 213 | \texttt{else if($UID_P$ == $UID_F$)} & \dots{} owner rights \\ |
|
304 | 306 |
|
305 | 307 | %%%%% |
306 | 308 |
|
| 309 | +ifdef([[[NOSPELLCHECK]]], [[[ |
307 | 310 | \pdfbookmark[1]{ruid, euid, suid}{resugid} |
| 311 | +]]]) |
308 | 312 |
|
309 | 313 | \begin{slide} |
310 | 314 | \sltitle{Real and effective UID/GID} |
|
378 | 382 | \item \texttt{gid\_t \funnm{getegid}(void)} |
379 | 383 |
|
380 | 384 | returns effective group ID of the calling process. |
381 | | -\item \texttt{int \funnm{getgroups}(int \emph{gidsz}, gid\_t \emph{glist}[])} |
382 | 385 |
|
| 386 | +ifdef([[[NOSPELLCHECK]]], [[[ |
| 387 | +\item \texttt{int \funnm{getgroups}(int \emph{gidsz}, gid\_t \emph{glist}[])} |
| 388 | +]]]) |
383 | 389 | -- \texttt{glist} returns at most \texttt{gidsz} supplementary group |
384 | 390 | IDs of the calling process and returns number of all GIDs of the process. |
385 | 391 | \end{itemize} |
|
419 | 425 | \end{itemize} |
420 | 426 | \item \texttt{int \funnm{setgid}(gid\_t \emph{gid});} \\ |
421 | 427 | similar to \texttt{setuid}, for group-IDs of the process. |
| 428 | +ifdef([[[NOSPELLCHECK]]], [[[ |
422 | 429 | \item \texttt{int \funnm{setgroups}(int \emph{ngroups}, |
423 | 430 | gid\_t *\emph{gidset})} \\ |
| 431 | +]]]) |
424 | 432 | sets the supplementary group IDs for the calling process. Can only be used |
425 | 433 | by superuser process. |
426 | 434 | \end{itemize} |
|
454 | 462 | \sltitle{File system} |
455 | 463 | \setlength{\baselineskip}{0.8\baselineskip} |
456 | 464 | \begin{itemize} |
457 | | -\item directories form a tree; together with files acyclical graph |
| 465 | +\item directories form a tree; together with files acyclic graph |
458 | 466 | (one file can have multiple references). |
459 | 467 | \item each directory also contains reference to itself '\texttt{.}' |
460 | 468 | (dot) and to its parent directory '\texttt{..}' (two dots). |
|
504 | 512 | kernel and running processes in the form of text files. However, some systems, |
505 | 513 | like Solaris, have those files in a binary form only and provide special |
506 | 514 | commands to read those (like \texttt{pargs}, \texttt{pldd}, etc.). |
507 | | -\item Modern Unix systems contain a special \emph{devfs} filesystem that |
508 | | -reflects an actual system configuration w.r.t. connected devices. I.e. after |
509 | | -connecting a USB stick a related device will appear under \texttt{/dev}. After |
510 | | -physically disconnecting it, the item will disappear. |
| 515 | +\item Modern Unix systems contain a special \emph{\texttt{devfs}} filesystem |
| 516 | +that reflects an actual system configuration w.r.t. connected devices. I.e. |
| 517 | +after connecting a USB stick a related device will appear under \texttt{/dev}. |
| 518 | +After physically disconnecting it, the item will disappear. |
511 | 519 | \end{itemize} |
512 | 520 |
|
513 | 521 | \endinput |
0 commit comments