Fabian Grünbichler
365915da9a
clippy: use strip_prefix instead of manual stripping
...
it's less error-prone (off-by-one!)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-20 16:22:59 +01:00
Fabian Grünbichler
0bfcea6a11
cleanup: remove unnecessary 'mut' and '.clone()'
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-14 16:01:33 +01:00
Thomas Lamprecht
b469011fd1
command socket: make create_control_socket private
...
this is internal for now, use the comanndo socket struct
implementation, and ideally not a new one but the existing ones
created in the proxy and api daemons.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-02 19:50:24 +01:00
Thomas Lamprecht
f3df613cb7
server: add CommandoSocket where multiple users can register commands
...
This is a preparatory step to replace the task control socket with it
and provide a "reopen log file" command for the rest server.
Kept it simple by disallowing to register new commands after the
socket gets spawned, this avoids the need for locking.
If we really need that we can always wrap it in a Arc<RWLock<..>> or
something like that, or even nicer, register at compile time.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-02 19:32:22 +01:00
Dietmar Maurer
197de83ffa
src/server/command_socket.rs: do not abort loop on client errors, allow backup gid
2020-05-07 09:27:33 +02:00
Wolfgang Bumiller
f7d4e4b506
switch from failure to anyhow
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-17 18:43:30 +02:00
Wolfgang Bumiller
db0cb9ce0b
update a chunk of stuff to the hyper release
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-13 11:24:41 +01:00
Wolfgang Bumiller
160fc8147f
src/server/command_socket.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Dietmar Maurer
e18a6c9ee5
update to nix 0.14, use code from proxmox:tools
2019-08-03 13:05:38 +02:00
Dietmar Maurer
59961b8954
src/server/command_socket.rs: check control socket permissions
2019-04-11 10:51:59 +02:00
Dietmar Maurer
321070b4fa
src/server/worker_task.rs: implement abort_worker (via command_socket)
2019-04-10 12:42:24 +02:00
Dietmar Maurer
cfb2d3c17c
src/server/command_socket.rs: correctly handle/spawn handle parallel connections
2019-04-10 11:05:00 +02:00
Dietmar Maurer
9b002cbc5f
src/server/worker_task.rs: use abstract socket
2019-04-10 09:03:17 +02:00
Dietmar Maurer
7ae0bf52dd
src/server/command_socket.rs: code cleanup - fix error message
2019-04-09 12:47:42 +02:00
Dietmar Maurer
e201753629
src/server/command_socket.rs: implement auto_remove flag
...
Remove the socket file on close.
2019-04-09 11:47:23 +02:00
Dietmar Maurer
78a39e0517
src/server/command_socket.rs: simple command socket
2019-04-08 17:59:39 +02:00