Replacement for old libnss-mysql as naming service library.
Replacement for old libnss-mysql as a naming service library for Linux.
You can store user and group information in MariaDB
or MySQL
database. E.g. ls
then automatically shows user name from the database, getent
shows users and groups.
password
, shadow
and group
getterscmake
build systemlibconfig
for configurationreal_escape_string
threads.c
from C11
Glibc 2.28
or newer, GCC 8
or newer, equivalent of Debian 10
(Buster) or newer, MySQL 5.5+
/MariaDB 10.0+
, mariadb-connector-c
/libmysqlclient
. Might work or compile on older systems, but it’s untestedArchlinux
, Debian
, Fedora
, Ubuntu
and Ubuntu LTS
Feedback is welcome.
See examples
and scripts/compile_and_test.sh
to see how to set it up and use.
docker compose up
./scripts/build-docker.sh
The result is in ./Debug/src
directory.
brew cask install vagrant
brew cask install virtualbox
vagrant plugin install vagrant-vbguest
vagrant up
./scripts/build-vagrant.sh
# or ./scripts/build-vagrant-release.sh
The result is in ./Debug/src
or ./Release/src
directory.
Required libraries for building the library and test, browse docker/Dockerfile*
to see required packages for other distros:
apt-get install coreutils build-essential cmake libmariadb-dev libconfig-dev syslog-ng-dev bats
apt-get install syslog-ng mariadb-client libconfig9 mariadb-server ruby pkg-config
COMPILE_ONLY=1 ./scripts/build-debug.sh
(sudo) make install
or
mkdir Debug
cd Debug
cmake ..
make
(sudo) make install
Set RELEASE
variable to any value to build a release build.
Copyright (C) 2015-2024 Ivan Stana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses.
Thanks for the inspiration and help.
https://github.com/Snaipe/Criterion/issues/206
Save this as criterion.gdb and start gdb with gdb ./yourtest -x criterion.gdb.
Then, from the gdb prompt, just call run, list children with info inferiors, switch inferiors with inferior