qubes-rpc, qrexec: register callbacks for qrexec-lib
Now qrexec-lib do not use exported symbols of particular names, but explicitly registered callbacks.
This commit is contained in:
parent
d660f260b8
commit
75b1e24bab
@ -71,6 +71,8 @@ int passfd_socket;
|
|||||||
|
|
||||||
int meminfo_write_started = 0;
|
int meminfo_write_started = 0;
|
||||||
|
|
||||||
|
void do_exec(const char *cmd);
|
||||||
|
|
||||||
void init()
|
void init()
|
||||||
{
|
{
|
||||||
peer_server_init(REXEC_PORT);
|
peer_server_init(REXEC_PORT);
|
||||||
@ -80,6 +82,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wake_meminfo_writer() {
|
void wake_meminfo_writer() {
|
||||||
|
@ -49,6 +49,7 @@ int main(int argc, char **argv)
|
|||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
// this will allow checking for possible feedback packet in the middle of transfer
|
// this will allow checking for possible feedback packet in the middle of transfer
|
||||||
set_nonblock(0);
|
set_nonblock(0);
|
||||||
|
register_notify_progress(¬ify_progress);
|
||||||
notify_progress(0, PROGRESS_FLAG_INIT);
|
notify_progress(0, PROGRESS_FLAG_INIT);
|
||||||
crc32_sum = 0;
|
crc32_sum = 0;
|
||||||
cwd = getcwd(NULL, 0);
|
cwd = getcwd(NULL, 0);
|
||||||
|
@ -31,11 +31,6 @@ int prepare_creds_return_uid(const char *username)
|
|||||||
return pwd->pw_uid;
|
return pwd->pw_uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void notify_progress(int p1, int p2)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char ** argv)
|
int main(int argc, char ** argv)
|
||||||
{
|
{
|
||||||
char *incoming_dir;
|
char *incoming_dir;
|
||||||
|
@ -963,6 +963,7 @@ int main(int argc, char **argv)
|
|||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
// this will allow checking for possible feedback packet in the middle of transfer
|
// this will allow checking for possible feedback packet in the middle of transfer
|
||||||
// if disabled, the copy_file process could hang
|
// if disabled, the copy_file process could hang
|
||||||
|
register_notify_progress(¬ify_progress);
|
||||||
notify_progress(0, PROGRESS_FLAG_INIT);
|
notify_progress(0, PROGRESS_FLAG_INIT);
|
||||||
//set_size_limit(1500000000, 2048);
|
//set_size_limit(1500000000, 2048);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user