Mir

Code review comment for lp:~robertcarr/mir/implement-client-credentials

Revision history for this message
Robert Ancell (robert-ancell) wrote :

It doesn't make sense that the client PID is in the protocol - the client doesn't volunteer the PID, it is taken from getsockopt ().

430 message ConnectParameters {
431 required string application_name = 1;
432 + optional int32 client_pid = 2;
433 }

Will the whole server go down if one client is not allowed? This shouldn't be an exception right?

358 + if (!session_authorizer->connection_is_allowed(request->client_pid(), request->application_name()))
359 + {
360 + std::string error_message = "Client with pid " + request->client_pid();
361 + error_message += " is not authorized to connect as ";
362 + error_message += request->application_name();
363 +
364 + BOOST_THROW_EXCEPTION(std::runtime_error(error_message));
365 + }

review: Needs Information

« Back to merge proposal