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 + }
« Back to merge proposal
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()) ) >client_ pid(); >application_ name(); EXCEPTION( std::runtime_ error(error_ message) );
359 + {
360 + std::string error_message = "Client with pid " + request-
361 + error_message += " is not authorized to connect as ";
362 + error_message += request-
363 +
364 + BOOST_THROW_
365 + }