Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying modules to /tmp? #11

Open
alexdewar opened this issue Oct 18, 2020 · 2 comments
Open

Copying modules to /tmp? #11

alexdewar opened this issue Oct 18, 2020 · 2 comments

Comments

@alexdewar
Copy link

This is just a suggestion, but how about copying the module files to /tmp and then just creating a symlink to it? That way a) it'll be faster and b) the files will automatically get cleaned on next boot and you won't need a separate service to do this.

@cptpcrd
Copy link

cptpcrd commented Oct 18, 2020

I have several concerns about this:

  1. Users might have a script to clean out /tmp periodically, or they might not have a tmpfs mounted on /tmp. The first case would render this package useless; the second would defeat the purpose of a move to /tmp.
  2. If a system is running low on memory, copying potentially several hundred megabytes of files to /tmp could make the system run out of memory.
  3. The fact that /tmp is world-writable creates major security concerns regarding how the files are copied. Specifically, the script (which runs as root) would need to be careful not to reuse an existing directory that was created by another process, or unprivileged users could potentially load arbitrary kernel modules..
  4. You would still need to clean up the symlink on the next reboot.

@JeanMax
Copy link

JeanMax commented Mar 7, 2021

I'm pretty sure that solves your issue: https://github.com/graysky2/anything-sync-daemon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants