Dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Taeyeon Mori 89d49d0ce1 Misc. fixes 2 years ago
..
.gitignore src: Add accumulated native code 3 years ago
README.md src: Add accumulated native code 3 years ago
chome.cpp src: Add accumulated native code 3 years ago
fakensudo.cpp src: Add accumulated native code 3 years ago
keepassxc-browser.hpp src: Add accumulated native code 3 years ago
keepassxc-print.cpp src: Add accumulated native code 3 years ago
kofd.hpp src: Add accumulated native code 3 years ago
kofd_pipe.hpp src: Add accumulated native code 3 years ago
kofs.hpp steamns: add -H switch to behave like chome 2 years ago
kons.hpp src: Add accumulated native code 3 years ago
kons_clone.hpp src: Add accumulated native code 3 years ago
koos.hpp src: Add accumulated native code 3 years ago
koproc.hpp src: Add accumulated native code 3 years ago
koutil.hpp src: Add accumulated native code 3 years ago
makefile src: Add accumulated native code 3 years ago
overlayns.cpp Misc. fixes 2 years ago
ssh-overlay-kiosk.cpp src: Add accumulated native code 3 years ago
steamns.cpp Misc. fixes 2 years ago
workspace.code-workspace src: Add accumulated native code 3 years ago

README.md

Random Sources

Playground for random utilities, mostly unprivileged single-user linux namespaces

Binaries

chome

Bind mount a different directory on top of $HOME to (partially) isolate a process

fakensudo

Pretend to be root (uid 0) by running in a single-user namespace mapping one's own UID to 0

keepassxc-print

Retrieve passwords from KeePassXC on the commandline via the browser interface.

overlayns

Run a command in a custom mount namespace. Like unshare -mUc with the added possibility of setting up custom mounts in the namespace before running the target application

ssh-overlay-kiosk

Create an emphemeral home directory for each invocation.

steamns

Isolate steam (and other 32-bit apps) in an unprivileged single-user-namespace "chroot"

Libraries

keepassxc-browser.hpp

Very simple library for interacting with KeePassXC's browser interface from native code

Depends on libsodium, jsoncpp, ko::proc

ko::fd

Convenient wrapper around Linux APIs with dirfd support

kofd_pipe.hpp adds a class for working with pairs of uni-directional pipes

Depends on ko::fs

ko::fs

Misc. filesystem utilities

  • cpath: Type that is trivially convertible to const char* and from std::string and std::filesystem::path
  • dir_ptr: Convenient iterator-based wrapper around the dirent API

ko::ns

Utilities for working with Linux Namespaces (unshare, clone, setns)

Depends on ko::util, ko::fd, ko::os

  • ko::ns::idmap: Functions for writing /proc/$$/Xidmap
  • ko::ns::mount: Functions for setting up mount namespaces
  • ko::ns::clone: Helpers for spawning processes in new namespaces (kons_clone.hpp, requires ko::proc)

ko::os

Misc. OS helpers

Depends on ko:: fs

  • get_home()
  • is_mountpoint()

ko::proc

Utilities for spawning and managing child processes

Depends on pthread, ko::fd

  • popen[p]: Spawn subprocess and communicate via pipes
  • sync::semapair: Synchronization across processes
  • child_ref: Child process reference with cleanup
  • [s]vclone: Wrappers around linux clone(CLONE_VM)
  • simple_spawn: Trivial fork(); execvp() primitive

ko::util

Misc. utilities

  • str: Type-safe-ly concatenate all arguments
  • cvshort: Short-circuit continuation using C-Style return codes