Qt 4.8
|
#include <qtransportauth_qws.h>
Public Functions | |
bool | connection () const |
Is the transport connection oriented. More... | |
Data () | |
Data (unsigned char p, int d) | |
void | setConnection (bool) |
Assert that the transport is connection oriented. More... | |
void | setTrusted (bool) |
Assert that the transport is trusted. More... | |
bool | trusted () const |
Is the transport trusted. More... | |
Public Variables | |
unsigned int | descriptor |
pid_t | processId |
unsigned char | progId |
unsigned char | properties |
unsigned char | status |
Definition at line 108 of file qtransportauth_qws.h.
|
inline |
Definition at line 110 of file qtransportauth_qws.h.
|
inline |
Definition at line 111 of file qtransportauth_qws.h.
|
inline |
Is the transport connection oriented.
This is true iff once a connection has been accepted, and state established, then further messages over the transport are guaranteed to have come from the original connecting entity. This is for example true for Unix Domain Sockets, but not for shared memory or UDP sockets.
By extension if the transport is not trusted() then it should not be assumed to be connection oriented, since spoofed connection information could be created. For example if we assume the TCP/IP transport is trusted, it can be treated as connection oriented; but this is only the case if intervening routers are trusted.
Connection oriented transports have authorization cached against the connection, and thus authorization is only done at connect time.
Definition at line 341 of file qtransportauth_qws.cpp.
Referenced by QTransportAuth::authToMessage(), and QAuthDevice::recvReadyRead().
|
inline |
Assert that the transport is connection oriented.
Definition at line 351 of file qtransportauth_qws.cpp.
|
inline |
Assert that the transport is trusted.
For example with respect to shared memory, if it is ensured that no untrusted root processes are running, and that unix permissions have been set such that any untrusted non-root processes do not have access rights, then a shared memory transport could be asserted to be trusted.
Definition at line 320 of file qtransportauth_qws.cpp.
|
inline |
Is the transport trusted.
This is true iff data written into the transport medium cannot be intercepted or modified by another process. This is for example true for Unix Domain Sockets, but not for shared memory or UDP sockets.
There is of course an underlying assumption that the kernel implementing the transport is sound, ie it cannot be compromised by writing to /dev/kmem or loading untrusted modules
Definition at line 305 of file qtransportauth_qws.cpp.
Referenced by QTransportAuth::authFromMessage(), and QTransportAuth::authToMessage().
unsigned int QTransportAuth::Data::descriptor |
Definition at line 124 of file qtransportauth_qws.h.
pid_t QTransportAuth::Data::processId |
Definition at line 125 of file qtransportauth_qws.h.
Referenced by QTransportAuth::authorizeRequest(), and QAuthDevice::recvReadyRead().
unsigned char QTransportAuth::Data::progId |
Definition at line 122 of file qtransportauth_qws.h.
Referenced by QTransportAuth::authFromMessage(), QTransportAuth::authorizeRequest(), and QTransportAuth::authToMessage().
unsigned char QTransportAuth::Data::properties |
Definition at line 121 of file qtransportauth_qws.h.
unsigned char QTransportAuth::Data::status |
Definition at line 123 of file qtransportauth_qws.h.
Referenced by QTransportAuth::authFromMessage(), QTransportAuth::authorizeRequest(), QTransportAuth::authToMessage(), QTransportAuth::connectTransport(), QTransportAuth::errorString(), and QAuthDevice::recvReadyRead().