escapefromlibc

command module
v0.0.0-...-e7133ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2016 License: MIT Imports: 4 Imported by: 0

README

escapefromlibc

This tool serves no practical purpose under ordinary circumstances. But it becomes a lifesaver when this accidentally happens:

rm -rf /lib/ x86_64-linux-gnu/libfancy.so

Oops. An extra space caused the command to wipe /lib. Restoring the contents of the directory from a backup may be possible but suddenly none of the standard Unix utilities work:

# mkdir /something
mkdir: error while loading shared libraries: libc.so.6
# vi something.txt
vi: error while loading shared libraries: libc.so.6

How do we fix this mess? If you installed escapefromlibc, you can breathe a sigh of relief. This handly little utility provides enough functionality to get you back on your feet.

# elc wget 'http://backup_server/bkp.tar.gz'
# elc tar xf bkp.tar.gz
# elc cp bkp/libc.so.6 /lib/x86_64-linux-gnu

escapefromlibc accomplishes all of this without a dependency on libc. It uses kernel syscalls directly to work its magic and restore your system to working order.

Building elc

Build elc is as simple as:

make

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
command
net

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL