Make --chroot and --discovery work at the same time#236
Make --chroot and --discovery work at the same time#236tomangert wants to merge 1 commit intochristgau:masterfrom
Conversation
Thread?!
Can you provide the error message(s) you encountered? I wonder why name resolution would be required, since the WSD protocol usually employs IP addresses for data exchange and not host names. I could imagine that urllib needs a resolver, but I'd like to figure that out. |
Not listening on 2424 Add the import concurrent.futures.thread Add the rest of the patch and it works. |
|
That example is with the ubuntu 24.04 apt version of wsdd. Same results with 0.8/0.9/latest. |
|
Thanks. I'll take a closer look as soon as time allows |
|
My understanding is that Lines 1117 to 1119 in 2b1a764 Changing it to On the other hand, copying files from within wsdd to the new root doesn't feel right, IMO. I'd suggest to copy files in the service file, like in the systemd unit, e.g. using However: The error message
How can one be sure which one is chosen at runtime? Including all seems dirty as well. Overall, chroot'ing a python script generally appears to be an issue. So in case a chroot environment is needed, one may create a virtual environment and chroot into that to avoid those issues. |
|
Note that the systemd units set There are additional options to lock it down further, and you might consider dropping the chroot: https://docs.arbitrary.ch/security/systemd.html Just be careful not to require very recent systemd versions -- check the "Availability" field for each option. I'd say systemd 239 (as in RHEL 8) is a very conservative upper baseline for compatibility. |
Thanks for this "heads up". That doesn't sound bad, IMO. I could remove the |
|
I think adding the following options is a good first step toward removing the chroot:
Then remove |
The discovery thread had errors when running under chroot. Tested on Ubuntu/jammy/22.04 and Ubuntu/noble/24.04