qrexec-agent.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. // directory for services configuration (for example 'wait-for-session' flag)
  23. #define QUBES_RPC_CONFIG_DIR "/etc/qubes/rpc-config"
  24. // support only very small configuration files,
  25. #define MAX_CONFIG_SIZE 4096
  26. int handle_handshake(libvchan_t *ctrl);
  27. void handle_vchan_error(const char *op);
  28. void do_exec(const char *cmd);
  29. /* call before fork() for service handling process (either end) */
  30. void prepare_child_env();
  31. pid_t handle_new_process(int type,
  32. int connect_domain, int connect_port,
  33. char *cmdline, int cmdline_len);
  34. int handle_data_client(int type,
  35. int connect_domain, int connect_port,
  36. int stdin_fd, int stdout_fd, int stderr_fd);
  37. struct qrexec_cmd_info {
  38. int type;
  39. int connect_domain;
  40. int connect_port;
  41. int cmdline_len;
  42. char cmdline[0];
  43. };