Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In the unlikely case that you actually have a static sbin and not just a symlink you could hack together a one-liner using file or objdump to check headers and set correct perms... but considering that everything in the dir should be either an executable or a directory, chmod a+x would work just as well.

If /usr/bin isn't a symlink to /bin or vice-versa, then you should have tools there to do the same thing.

If you somehow still have a working C compiler (or access to another language that can do syscalls or has C bindings), it's pretty easy to write a wrapper for the syscall.

If there's an rsync daemon, nfs share, etc. running, you can copy over a static busybox and fix the system that way.

If you're allowed to take the system down, it's really easy - just boot up a live image and change the permissions.



> If you're allowed to take the system down, it's really easy - just boot up a live image and change the permissions.

Having held a couple interviews like this, if you suggest taking the system down, I'll tell you that would work -- now tell me another way to do it.

It's still a plus that you suggested it, even if it isn't enough of an answer on its own.


I thought of another thing: many desktop systems have automount daemons, so USB could also be used to transfer over a busybox in that case.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: