https://github.com/coastalwhite/libpam-sys
A `-sys` crate for PAM which supports both LinuxPAM and OpenPAM
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.3%) to scientific vocabulary
Repository
A `-sys` crate for PAM which supports both LinuxPAM and OpenPAM
Basic Info
- Host: GitHub
- Owner: coastalwhite
- License: apache-2.0
- Language: Rust
- Default Branch: main
- Size: 13.7 KB
Statistics
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
libpam-sys
This is an FFI wrapper of the Pluggable Authentication Modules_ (PAM) API. The wrapper supports both the Linux-PAM and OpenPAM implementation that are present across many Linux, BSD and macOS systems.
Important links
- Documentation
- Crates.io
- Pampoon: A safe wrapper of the application PAM functions
What is PAM?
PAM is short for Pluggable Authentication Modules. It provides the verification of user credentials for most Unix systems. This includes Linux, macOS and most BSD distributions. PAM allows system administrators to alter the authentication configuration without recompiling all the applications that utilize PAM. It also also for more complicated authentication schemes, which are commonly used within larger organizations. This includes the use of smartcards and one-time tokens.
Usage
In most cases, this crate is too low-level. In which case, you are better off using a safe abstraction around this crate. Examples include Pampoon and pam.
By default, the crate will detect the implementation of PAM that is present on your system. Usually, this is all that is needed.
You can use the bindings in the root module to create a implementation-agnostic PAM application or PAM Module. The bindings outside of the implementation specific modules can be used for implementation-specific PAM applications and PAM modules.
Cross compilation
There are environment variables to change the shared library path and to change the PAM implementation.
PAM_PATH=/path/to/libpam.sosets the linked path forlibpam.so. If not set,pkg-configis used to find the shared library.USE_LINUX_PAM=1makes the build assume that the shared library is Linux-PAM.USE_OPENPAM=1makes the build assume that the shared library is OpenPAM.
There are also 3 features that force the library to utilize the bindings for one of the implementations and expose more specific bindings which are present in their corresponding modules.
linux-pamensures that Linux-PAM is assumed as the implementation and exposes the Linux-PAM specific functions.openpamensures that OpenPAM is assumed as the implementation and exposes the OpenPAM specific functions.read_cooked_linesis a subfeature ofopenpamwhich exposes even more functions of OpenPAM.
In general, the priority is that cargo features take precedence of environment variables, and environment variables take precedence over the inferred implementation.
Why use this over the existing pam-sys?
This crate was created to address some problems with the pam-sys
crate. There are three main issues in pam-sys at the time of
writing.
- Lack of support for other implementations of PAM
pam-sysis more than what a-sysis supposed to do.- No support for cross-compilation
The second point seems to be fixed in alpha released for the 1.0 release. However, the author seems to have moved on from the project (which is fine). This is also why committing back to the repository also is not possible.
This crates solves all these problems.
License
The project is made available under the MIT and APACHE license. See the
LICENSE-MIT and LICENSE-APACHE files, respectively, for more information.
Contributions
Please report any bugs and possible improvements as an issue within this repository. Pull requests are also welcome.
Owner
- Name: Gijs Burghoorn
- Login: coastalwhite
- Kind: user
- Location: Netherlands
- Company: Polars
- Website: gburghoorn.com
- Repositories: 103
- Profile: https://github.com/coastalwhite
Rusty Hardware and Security Guy 🦀
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: 11 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Gijs Burghoorn | g****n@g****m | 1 |
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0