https://github.com/twosigma/nsncd
nscd-compatible daemon that proxies lookups, without caching
https://github.com/twosigma/nsncd
rust
Last synced: about 1 year ago
JSON representation
nscd-compatible daemon that proxies lookups, without caching
- Host: GitHub
- URL: https://github.com/twosigma/nsncd
- Owner: twosigma
- License: apache-2.0
- Created: 2020-09-29T17:02:38.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-12-23T10:28:19.000Z (over 1 year ago)
- Last Synced: 2025-03-31T13:16:57.338Z (over 1 year ago)
- Topics: rust
- Language: Rust
- Homepage:
- Size: 318 KB
- Stars: 62
- Watchers: 12
- Forks: 14
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# nsncd - the name service non-caching daemon
`nsncd` is a nscd-compatible daemon that proxies lookups, without caching.
## Why?
`nsncd` can be used in situations where you want to make an application use nss
plugins available to a different libc than the one the application will load.
Since most (all?) libc implementations will try to use `/var/run/nscd/socket` if
it exists, you can make all lookups on a machine attempt to use the libc that
nsncd is running with (and any nss plugins available to it), regardless of the
libc used by a particular application.
It is also a fairly minimal and clean implementation of (a part of) the `nscd`
protocol, which is otherwise only really documented in implementations of libc,
and mailing lists.
## Installing
Just run the `nsncd` binary and it will listen at `/var/run/nscd/socket`.
There's a simple `systemd` unit file, too.
If you're on a Debian-based system, you can use the provided Debian package to
install `nsncd` to run under `systemd`. See `debian/README.source` for how to
build it - we use a few Rust crates that aren't packaged for stable Debian
releases.
## Configuration
`nsncd` looks in its environment for configuration.
There are two integer variables we pay attention to: `NSNCD_WORKER_COUNT` and
`NSNCD_HANDOFF_TIMEOUT`. Both must be positive (non-zero), and the timeout is
in seconds.
We also pay attention to variables `NSNCD_IGNORE_` where ``
is one of the database names from `nsswitch.conf(5)`, capitalized:
- NSNCD_IGNORE_GROUP
- NSNCD_IGNORE_HOSTS
- NSNCD_IGNORE_INITGROUPS
- NSNCD_IGNORE_NETGROUP
- NSNCD_IGNORE_PASSWD
- NSNCD_IGNORE_SERVICES
These variables must be either `true` or `false`. The default is `false` (don't
ignore any requests). If one of these variables is set to true, `nsncd` will
not respond to the requests related to that database.
Some request types may be ignored by the implementation (e.g. the ones that
request a file descriptor pointing into internal cache structures).
`NSNCD_SOCKET_PATH` may be set to override the default location of the socket.
## Bug Reports and Contributions
Please create GitHub issues and/or pull requests.
## License
`nsncd` is licensed under the [Apache License 2.0](./LICENSE).