qrexec: register exec function

Update for shared libqrexec.so API (instead of statically linked one).
This commit is contained in:
Marek Marczykowski-Górecki 2014-06-26 01:20:13 +02:00
parent 17350f6f69
commit 48685938ff

View File

@ -55,6 +55,8 @@ int passfd_socket;
int meminfo_write_started = 0; int meminfo_write_started = 0;
void do_exec(const char *cmd);
void handle_vchan_error(const char *op) void handle_vchan_error(const char *op)
{ {
fprintf(stderr, "Error while vchan %s, exiting\n", op); fprintf(stderr, "Error while vchan %s, exiting\n", op);
@ -120,6 +122,7 @@ void init()
umask(077); umask(077);
trigger_fd = trigger_fd =
open(QREXEC_AGENT_TRIGGER_PATH, O_RDONLY | O_NONBLOCK); open(QREXEC_AGENT_TRIGGER_PATH, O_RDONLY | O_NONBLOCK);
register_exec_func(do_exec);
/* wait for qrexec daemon */ /* wait for qrexec daemon */
while (!libvchan_is_open(ctrl_vchan)) while (!libvchan_is_open(ctrl_vchan))