Skip to content

Commit 9114fb3

Browse files
committed
Avoid passing stderr_fd to handle_data_client
It is always -1, and an assertion would fail if it was not.
1 parent 8b683a8 commit 9114fb3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

agent/qrexec-agent-data.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ pid_t handle_new_process(int type, int connect_domain, int connect_port,
322322
/* Returns exit code of remote process */
323323
int handle_data_client(
324324
int type, int connect_domain, int connect_port,
325-
int stdin_fd, int stdout_fd, int stderr_fd, int buffer_size, pid_t pid,
325+
int stdin_fd, int stdout_fd, int buffer_size, pid_t pid,
326326
const char *extra_data)
327327
{
328328
int exit_code;
@@ -362,7 +362,7 @@ int handle_data_client(
362362

363363
req.stdin_fd = stdin_fd;
364364
req.stdout_fd = stdout_fd;
365-
req.stderr_fd = stderr_fd;
365+
req.stderr_fd = -1;
366366
req.local_pid = pid;
367367

368368
req.is_service = false;

agent/qrexec-agent.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pid_t handle_new_process(int type,
4545
struct qrexec_parsed_command *cmd);
4646
int handle_data_client(int type,
4747
int connect_domain, int connect_port,
48-
int stdin_fd, int stdout_fd, int stderr_fd,
48+
int stdin_fd, int stdout_fd,
4949
int buffer_size, pid_t pid, const char *extra_data);
5050

5151

agent/qrexec-client-vm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,11 @@ int main(int argc, char **argv)
324324

325325
ret = handle_data_client(MSG_SERVICE_CONNECT,
326326
exec_params.connect_domain, exec_params.connect_port,
327-
inpipe[1], outpipe[0], -1, buffer_size, child_pid, prefix_data);
327+
inpipe[1], outpipe[0], buffer_size, child_pid, prefix_data);
328328
} else {
329329
ret = handle_data_client(MSG_SERVICE_CONNECT,
330330
exec_params.connect_domain, exec_params.connect_port,
331-
stdout_fd, 0, -1, buffer_size, 0, prefix_data);
331+
stdout_fd, 0, buffer_size, 0, prefix_data);
332332
}
333333

334334
close(trigger_fd);

0 commit comments

Comments
 (0)