If the loader context is a hydra loader, launchpad doesn't check the
client process ID. The child process of the hydra loader tries to
connect to the launchpad-process-pool. If launchpad rejects the request,
the child process of the hydra loader will be terminated.
Change-Id: If4898ba64acb75f647086e266289a669f83673d5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
goto error;
}
- if (cred.pid != cpc_pid) {
+ if (cpc_pid != -1 && cred.pid != cpc_pid) {
_E("Invalid accept. pid(%d)", cred.pid);
goto error;
}
if (!cpc->prepared) {
ret = __accept_candidate_process(fd, &client_fd, &client_pid,
- cpc->pid);
+ cpc->is_hydra ? -1 : cpc->pid);
if (ret >= 0) {
/* for hydra need to set pid to pid of non-hydra candidate, */
/* which is connecting now */