Lurker News

Comments (217) 34 threads

Earlier comments
jspears2 replies#
What about using LD_PRELOAD to load a FS shim that prevents writing to the FS?
_kst_1 reply#
What about making the tool behave sanely so you don't have to play tricks with the OS to protect yourself from its behavior?

If I type "grep", I don't want it to try to execute "g", "gr", and "gre" as I type it -- not if those commands don't exist, and especially not if they do.
Just don't execute a command unless the user requests it (say, by typing Enter). Problem solved.

jspears#
It would remove the live execution bits which are kinda neet. I think the cli has a lot of life left in it and ideas like this are worth exploring. Perhaps compromises are necessary but I would love a tool that pretends to execute something shows the results and gives the option of committing those changes. Think of a find | xargs grep | rm That then shows the output but prompts the user for commit.
akavel1 reply#
I don't think LD_PRELOAD would be enough; there are programs which don't use libc and reach straight for syscalls (e.g. the whole Go ecosystem/runtime)
jspears#
Sure; it wouldn’t be perfect safety but would work for a large swath of Unix tools.
swiley#
Maybe if it automatically chrooted everything to prevent side affects (or better yet: isolate them to a ramdisk.) That would be awesome.
agumonkey#
Massive bravo. Thought about the need for this for ages.
msravi#
For mac: go get -u github.com/akavel/up

Load more comments