Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   sudo_logsrv.proto    ( 5 )

протокол сервера журнала Sudo (Sudo log server protocol)

Server Messages

A ServerMessage is a container used to encapsulate all the possible message types the server may send to a client.

message ServerMessage { oneof type { ServerHello hello = 1; TimeSpec commit_point = 2; string log_id = 3; string error = 4; string abort = 5; } }

The different ServerMessage sub-messages the server may sent to the client are described below.

ServerHello hello message ServerHello { string server_id = 1; string redirect = 2; repeated string servers = 3; bool subcommands = 4; }

The ServerHello message consists of server information sent when the client first connects. It contains the following members:

server_id A free-form server description. Usually this includes the name and version of the implementation running on the log server. This member is always present.

redirect A host and port separated by a colon (''): that the client should connect to instead. The host may be a host name, an IPv4 address, or an IPv6 address in square brackets. This may be used for server load balancing. The server will disconnect after sending the ServerHello when it includes a redirect.

servers A list of other known log servers. This can be used to implement log server redundancy and allows the client to discover all other log servers simply by connecting to one known server. This member may be omitted when there is only a single log server.

subcommands If set, the server supports logging additional commands during a session. The client may send an AcceptMessage or RejectMessage when sudo is running in intercept mode. In this mode, commands spawned from the initial command authorized by sudo are subject to policy restrictions and/or are logged. If subcommands is false, the client must not attempt to log additional commands.

TimeSpec commit_point A periodic time stamp sent by the server to indicate when I/O log buffers have been committed to storage. This message is not sent after every IoBuffer but rather at a server-configurable interval. When the server receives an ExitMessage, it will respond with a commit_point corresponding to the last received IoBuffer before closing the connection.

string log_id The server-side ID of the I/O log being stored, sent in response to an AcceptMessage where expect_iobufs is true.

string error A fatal server-side error. The server will close the connection after sending the error message.

string abort An abort message from the server indicates that the client should kill the command and terminate the session. It may be used to implement simple server-side policy. The server will close the connection after sending the abort message.