qrexec: do not reset umask to 077 for every started process
This umask will be inherited by any process started directly by qrexec (i.e. without help of fork-server).
This commit is contained in:
parent
e8c9f010ad
commit
731ee3e09a
@ -99,15 +99,16 @@ void handle_vchan_error(const char *op)
|
|||||||
|
|
||||||
void init()
|
void init()
|
||||||
{
|
{
|
||||||
|
mode_t old_umask;
|
||||||
/* FIXME: This 0 is remote domain ID */
|
/* FIXME: This 0 is remote domain ID */
|
||||||
ctrl_vchan = libvchan_server_init(0, VCHAN_BASE_PORT, 4096, 4096);
|
ctrl_vchan = libvchan_server_init(0, VCHAN_BASE_PORT, 4096, 4096);
|
||||||
if (!ctrl_vchan)
|
if (!ctrl_vchan)
|
||||||
handle_vchan_error("server_init");
|
handle_vchan_error("server_init");
|
||||||
if (handle_handshake(ctrl_vchan) < 0)
|
if (handle_handshake(ctrl_vchan) < 0)
|
||||||
exit(1);
|
exit(1);
|
||||||
umask(0);
|
old_umask = umask(0);
|
||||||
trigger_fd = get_server_socket(QREXEC_AGENT_TRIGGER_PATH);
|
trigger_fd = get_server_socket(QREXEC_AGENT_TRIGGER_PATH);
|
||||||
umask(077);
|
umask(old_umask);
|
||||||
register_exec_func(do_exec);
|
register_exec_func(do_exec);
|
||||||
|
|
||||||
/* wait for qrexec daemon */
|
/* wait for qrexec daemon */
|
||||||
|
Loading…
Reference in New Issue
Block a user