- C 85%
- Roff 13.1%
- Meson 1.9%
| COPYING | ||
| htpasswd.1 | ||
| htpasswd.c | ||
| landloc.h | ||
| meson.build | ||
| README.md | ||
htpasswd-portable
OpenBSD's htpasswd(1) ported to Linux.
Modified from shtrophic's version to add rudimentary support to take -bn as per baremetalDMR installer.
htpasswd is used for baremetalDMR's dashboard login. While some distros have a dedicated package for apache2-utils; others do not. Rather than make users install full apache just for a single binary; just include the binary. This also eliminates the apache2-utils dependency entirely.
Setup
meson setup builddir --buildtype release
meson install -C builddir
Binaries are distributed in the baremtalDMR installer tarball for your architecture.
Differences from the original
Where applicable, libbsd does the heavy lifting by providing functions that are missing in glibc.
The original htpasswd uses crypt_newhash() to create a bcrypt hash of the password with a random salt.
This functionality has been ported using nettle's blowfish_bcrypt_hash(). Additionally, bcrypt_autorounds() is included in this port as well, to dynamically set the number of hashing rounds based on the available computing power. The original sandboxing parts using pledge(2) and unveil(2) have been ported to Linux's landlock(7) on a best-effort basis using landloc.h.