package stopevidence import "errors" // ErrForeignHolder is a database descriptor that root's observation cannot // attribute to the admitted session's replicator. var ErrForeignHolder = errors.New("stopevidence: a descriptor other than the replicator's holds the database") // Descriptor is one open descriptor root observed holding a watched file: // the process, the task whose table showed it, the descriptor number and // the open file's device and inode. A zero identity is a match by name // whose file could not be reached. type Descriptor struct { PID int `json:"pid"` TID int `json:"tid"` FD int `json:"fd"` Device uint64 `json:"device"` Inode uint64 `json:"inode"` } // DescriptorHint is the agent's record of one of its own replicator's // descriptors, taken from its own table when the replicator opened. It is a // narrowing hint only (claim Plan 11, R3): root exempts a descriptor only // when its own scan finds it in the agent's authenticated process, at this // number, on this file. A hint never adds a holder or names a process. type DescriptorHint struct { FD int `json:"fd"` Device uint64 `json:"device"` Inode uint64 `json:"inode"` } // FileIdentity names a file by device and inode, as the launch journal // records it. type FileIdentity struct { Device uint64 `json:"device"` Inode uint64 `json:"inode"` } // Agent is the authenticated agent process root observed on its socket: // its pid and its start time (field 22 of /proc//stat). Root takes // both from the peer credentials, never from a request. type Agent struct { PID int Start string }