lua-bcrypt

Secure password hashing for Lua
Log | Files | Refs | README

commit 2267e4266bb683d88de37a92967b9807c8a70439
parent 3d36c02546ce6a54574b3d73d427f09654603cd2
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Thu,  9 Jul 2020 15:20:44 +0300

Remove chroot stuff

Diffstat:
MREADME.md | 28----------------------------
Dtest-chroot.lua | 11-----------
2 files changed, 0 insertions(+), 39 deletions(-)

diff --git a/README.md b/README.md @@ -78,31 +78,3 @@ str, work )` takes less than `t` milliseconds (assuming your CPU isn't dodgy). Note that this will take at least `2 * SAMPLES * t` ms to evaluate. - - -Chroot ------- - -[lua-setuid]: https://github.com/mikejsavage/lua-setuid -[test-chroot]: https://github.com/mikejsavage/lua-bcrypt/blob/master/test-chroot.lua - -Some operating systems do not provide a method for reliably getting -random data from inside a chroot. One workaround for this is to chroot -after initialising lua-bcrypt, for example by using -[lua-setuid][lua-setuid]. - - local setuid = require( "setuid" ) - local bcrypt = require( "bcrypt" ) - - assert( setuid.chroot( "." ) ) - assert( not io.open( "/etc/passwd", "r" ) ) - - print( bcrypt.digest( "adsf", 5 ) ) - -There are also operating system specific workarounds. On -non-bleeding-edge (earlier than 3.17) Linux kernels, you can run: - - mkdir /path/to/chroot/dev - mknod -m 644 /path/to/chroot/dev/urandom c 1 9 - -I have included a test script in [`test-chroot.lua`][test-chroot]. diff --git a/test-chroot.lua b/test-chroot.lua @@ -1,11 +0,0 @@ -#! /usr/bin/lua - -local setuid = require( "setuid" ) - -assert( setuid.chroot( "." ) ) -assert( not io.open( "/etc/passwd", "r" ) ) - -local bcrypt = require( "bcrypt" ) - -print( "It works!" ) -print( bcrypt.digest( "adsf", 5 ) )