aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPeter Seebach <seebs@eee12.(none)>2010-03-26 14:48:36 -0500
committerPeter Seebach <seebs@eee12.(none)>2010-03-26 14:50:04 -0500
commit80259da816b82c5bdfbf9515935823a157f5d0e9 (patch)
treef5120633e788d0d36ea2133d436d52c563d08d98 /doc
parentcaeebc0dd6ff538629687b55a5ce72554a7c3f34 (diff)
downloadpseudo-80259da816b82c5bdfbf9515935823a157f5d0e9.tar.gz
pseudo-80259da816b82c5bdfbf9515935823a157f5d0e9.tar.bz2
pseudo-80259da816b82c5bdfbf9515935823a157f5d0e9.zip
Track file open flags
This patch adds support for checking whether a file was opened for reading, writing, or both, as well as tracking append flags. It is not very well tested. This is preparation for improved host contamination checking.
Diffstat (limited to 'doc')
-rw-r--r--doc/database9
-rw-r--r--doc/pseudo_ipc9
2 files changed, 14 insertions, 4 deletions
diff --git a/doc/database b/doc/database
index cac7a3a..da8f750 100644
--- a/doc/database
+++ b/doc/database
@@ -64,6 +64,7 @@ LOGS
severity (severity id)
text (anything else you wanted to say)
tag (identifier for operations)
+ access (integer)
The log database contains a primary table (logs). As of this writing it
is not indexed, because indexing is expensive during writes (common, for
@@ -79,3 +80,11 @@ The log database "tag" field, added since the initial release of pseudo,
is available for tagging operations. When a client connects to the
pseudo server, it passes the value of the environment variable PSEUDO_TAG;
this tag is then recorded for all log entries pertaining to that client.
+
+The log database "access" field, added since the initial release of pseudo,
+stores values which are bitwise masks of the values 1 (execute), 2 (write),
+4 (read), and 8 (append), used to report the modes with which a file was
+opened. These values are not completely reliable. A value of 0 is typical
+for non-open operations, and a value outside the 0-15 range (usually -1)
+indicates that something went wrong trying to identify the mode of a given
+open.
diff --git a/doc/pseudo_ipc b/doc/pseudo_ipc
index 6a73ec8..150a43e 100644
--- a/doc/pseudo_ipc
+++ b/doc/pseudo_ipc
@@ -4,7 +4,7 @@ typedef struct {
pseudo_msg_type_t type;
op_id_t op;
res_id_t result;
- int xerrno;
+ int access;
int client;
dev_t dev;
unsigned long long ino;
@@ -59,9 +59,10 @@ uid/gid/mode/rdev on response, and never sends a path back. Dev and inode
are currently changed by stat-by-path operations, but this may turn out to
be wrong.
-xerrno is used to contain a changed errno if, at some point, the server wants
-to override the default errno. Normally, the client just uses its existing
-errno.
+access holds information about the open mode of a file (read, write, append,
+etc.), but is not fully implemented.
+
+A field "xerrno" used to exist; it was never actually implemented.
nlink is used to forward the number of links. The server DOES NOT modify
this. Rather, nlink is used to provide better diagnostics when checking