qrexec-agent.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * The Qubes OS Project, http://www.qubes-os.org
  3. *
  4. * Copyright (C) 2013 Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version 2
  9. * of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. *
  20. */
  21. #define QREXEC_FORK_SERVER_SOCKET "/var/run/qubes/qrexec-server.%s.sock"
  22. int handle_handshake(libvchan_t *ctrl);
  23. void handle_vchan_error(const char *op);
  24. void do_exec(const char *cmd);
  25. /* call before fork() for service handling process (either end) */
  26. void prepare_child_env();
  27. pid_t handle_new_process(int type,
  28. int connect_domain, int connect_port,
  29. char *cmdline, int cmdline_len);
  30. int handle_data_client(int type,
  31. int connect_domain, int connect_port,
  32. int stdin_fd, int stdout_fd, int stderr_fd);
  33. struct qrexec_cmd_info {
  34. int type;
  35. int connect_domain;
  36. int connect_port;
  37. int cmdline_len;
  38. char cmdline[0];
  39. };