docs/diploma

diff thesis/tex/4-MasqmailsFuture.tex @ 180:d75bd7a72d8b

wrote about IPC, drawed picture of new arch
author meillo@marmaro.de
date Sat, 27 Dec 2008 19:25:06 +0100
parents b426a663d5f0
children e35c7962d84f
line diff
     1.1 --- a/thesis/tex/4-MasqmailsFuture.tex	Sat Dec 27 18:47:23 2008 +0100
     1.2 +++ b/thesis/tex/4-MasqmailsFuture.tex	Sat Dec 27 19:25:06 2008 +0100
     1.3 @@ -433,16 +433,75 @@
     1.4  
     1.5  
     1.6  
     1.7 -\subsection{Intermodule communication}
     1.8 +\subsection{Inter-module communication}
     1.9 +
    1.10 +Communication between modules is required to exchange data and status information. It is also called ``Inter-process communication'' (short: \NAME{IPC}), as modules are programs being part of a larger system, and processes are generally seen as programs in execution.
    1.11 +
    1.12 +The connections between \name{queue-in} and \name{scanning}, aswell as between \name{scanning} and \name{queue-out} is provided by the queues, only sending signals to trigger instant runs may be useful. Communication between receiving and transport modules and the outside world are done using the specific protocol they do handle.
    1.13 +
    1.14 +Left is only communication between the receiver modules and \name{queue-in}, and between \name{queue-out} and the transport modules. Data is exchanged done using \unix\ pipes and a simple protocol is used.
    1.15 +
    1.16 +\begin{figure}
    1.17 +	\begin{center}
    1.18 +		\input{input/ipc-protocol.tex}
    1.19 +	\end{center}
    1.20 +	\caption{State diagram of the protocol used for \NAME{IPC}}
    1.21 +	\label{fig:ipc-protocol}
    1.22 +\end{figure}
    1.23 +
    1.24 +% timing
    1.25 +One dialog consists of the four phases: connection attempt, acceptance reply, data transfer, success reply. The order is always the same. The connection attempt and data transfer are sent by the client process; replies are sent by the server process.
    1.26 +
    1.27 +% semantics
    1.28 +The connection attempt is simply opening the connection. This starts the dialog. A positive reply by the server leads to the data transfer, but a negative reply refuses the connection and resets both client and server to the state before the connection attempt. If the connection attempt was accepted, the client sends the data ending with a terminator sequence. When this terminator appears, the server process knows the complete data was transfered. The server process takes responsibility of the data in sending a positive success reply. A negative success reply resets both client and server to the state before the connection attempt.
    1.29 +
    1.30 +The data transfered needs to be of specific format. Used is the same format in which messages are spooled in the mail queues. See the following section for details. %fixme: check if it is the following section
    1.31 +
    1.32 +% syntax
    1.33 +Data transfer is done sending plain text data. %fixme: utf8 ?
    1.34 +The terminator sequence used to indicate the end of the data transfer is a single dot on a line on its own. Line separators are the combination of \name{New Line} and \name{Carriage Return}, as it is used in various Internet protocols like \SMTP. Replys are one-digit numbers with \texttt{0} meaning success and any other number (\texttt{1}--\texttt{9}) indicate failure. %fixme: is it NL-CR or CR-NL? What are the octal values?
    1.35 +
    1.36 +Figure \ref{fig:ipc-protocol} is a state diagram for the protocol.
    1.37  
    1.38  
    1.39  
    1.40  \subsection{Spool file format}
    1.41  
    1.42 +<< talk about fanf >>
    1.43 +
    1.44 +<< inode stuff of qmail >>
    1.45 +
    1.46 +<< keep it simple! >>
    1.47 +
    1.48 +\begin{verbatim}
    1.49 +s f /          envelope data
    1.50 +p i |          NL
    1.51 +o l |       /  header lines
    1.52 +o e |  mail |  NL
    1.53 +l   \       \  mail body
    1.54 +\end{verbatim}
    1.55 +
    1.56 +
    1.57  
    1.58  \subsection{Rights and permission}
    1.59  
    1.60 +setuid/setgid or not?
    1.61  
    1.62 +how many system users?
    1.63 +
    1.64 +what permission where?
    1.65 +
    1.66 +what can crash if an attacker succeeds?
    1.67 +
    1.68 +which process runs with what rights?
    1.69 +
    1.70 +where to drop privelege?
    1.71 +
    1.72 +how is which process invoked?
    1.73 +
    1.74 +master process? needed, or wanted?
    1.75 +
    1.76 +which are the daemon processes?
    1.77  
    1.78  
    1.79