From d306821b53b1cbec8c5d8249c55374f2d71ada03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 15 Jul 2022 11:14:46 +0300 Subject: [PATCH] update README --- README.md | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 953d9ad..b05c357 100644 --- a/README.md +++ b/README.md @@ -99,11 +99,33 @@ $ zig build test Test the so ----------- -``` -sed -i 's/\(\(passwd\|group\).*files\)$/\1 turbo/' /etc/nsswitch.conf -``` +Build: -Other commands will be documented as they are implemented. + zig build -Dtarget=x86_64-linux-gnu.2.31 -Dcpu=x86_64_v3 -Drelease-fast=true -Dstrip=true + +Generate `db.turbo`: + + zig-out/bin/turbonss-unix2db --passwd /etc/passwd --group /etc/group + zig-out/bin/turbonss-analyze db.turbo + <...> + +Run a test container: + + $ docker run -ti --rm --privileged -v `pwd`:/etc/turbonss -w /etc/turbonss debian:bullseye + # cp zig-out/lib/libnss_turbo.so.2 /lib/x86_64-linux-gnu + # sed -i 's/\(\(passwd\|group\).*files\)$/\1 turbo/' /etc/nsswitch.conf + +And knock yourself out: + + getent passwd + getent group + id root + +This is probably not very interesting; you may want to take a larger corpus of +/etc/passwd and /etc/group for more interesting results. + +Dependencies +------------ This project uses [git subtrac][git-subtrac] for managing dependencies. They work just like regular submodules, except all the refs of the submodules are in