f1a7df6e95
Processes in AppVM can ask qrexec-agent to send a MSG_AGENT_TO_SERVER_TRIGGER_EXEC message to qrexec-daemon. The latter will execute predefined program. It is useful for the purpose of file copy; the predefined program will create a connected qfile-daemon<->qfile-agent pair.
67 lines
1.7 KiB
C
67 lines
1.7 KiB
C
/*
|
|
* The Qubes OS Project, http://www.qubes-os.org
|
|
*
|
|
* Copyright (C) 2010 Rafal Wojtczuk <rafal@invisiblethingslab.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*
|
|
*/
|
|
|
|
#define QREXEC_DAEMON_SOCKET_DIR "/var/run/qubes"
|
|
#define MAX_FDS 256
|
|
#define MAX_DATA_CHUNK 4096
|
|
|
|
#define REXEC_PORT 512
|
|
|
|
#define QREXEC_AGENT_TRIGGER_PATH "/var/run/qubes/qrexec_agent"
|
|
|
|
enum {
|
|
MSG_CLIENT_TO_SERVER_EXEC_CMDLINE = 0x100,
|
|
MSG_CLIENT_TO_SERVER_JUST_EXEC,
|
|
|
|
MSG_SERVER_TO_AGENT_EXEC_CMDLINE,
|
|
MSG_SERVER_TO_AGENT_JUST_EXEC,
|
|
MSG_SERVER_TO_AGENT_INPUT,
|
|
MSG_SERVER_TO_AGENT_CLIENT_END,
|
|
|
|
MSG_XOFF,
|
|
MSG_XON,
|
|
|
|
MSG_AGENT_TO_SERVER_STDOUT,
|
|
MSG_AGENT_TO_SERVER_STDERR,
|
|
MSG_AGENT_TO_SERVER_EXIT_CODE,
|
|
MSG_AGENT_TO_SERVER_TRIGGER_EXEC,
|
|
|
|
MSG_SERVER_TO_CLIENT_STDOUT,
|
|
MSG_SERVER_TO_CLIENT_STDERR,
|
|
MSG_SERVER_TO_CLIENT_EXIT_CODE
|
|
};
|
|
|
|
enum {
|
|
QREXEC_EXECUTE_FILE_COPY=0x700,
|
|
QREXEC_EXECUTE_FILE_COPY_FOR_DISPVM
|
|
};
|
|
|
|
struct server_header {
|
|
unsigned int type;
|
|
unsigned int clid;
|
|
unsigned int len;
|
|
};
|
|
|
|
struct client_header {
|
|
unsigned int type;
|
|
unsigned int len;
|
|
};
|