Giter VIP home page Giter VIP logo

pam-rs's Introduction

pam-rs

Rust interface to the pluggable authentication module framework (PAM).

The goal of this library is to provide a type-safe API that can be used to interact with PAM. The library is incomplete - currently it supports a subset of functions for use in a pam authentication module. A pam module is a shared library that is invoked to authenticate a user, or to perform other functions.

๐ŸŒ pam-http

An example of using pam-rs by performing HTTP basic access auth to authenticate users.

๐Ÿป pam-sober

If you aren't sober enough for basic math, you can't login!

Credits

The contents of this repo are heavily borrowed from:

pam-rs's People

Contributors

anowell avatar bossmc avatar clee avatar mbr avatar nigma1337 avatar syntaxpolice avatar zbrox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pam-rs's Issues

pam/src: module not FFI-safe

It looks like rust 1.41.0 does not like a few of the extern interfaces: (or am I missing something?)

warning: `extern` block uses type `std::boxed::Box<module::PamDataT>`, which is not FFI-safe
  --> /home/user/pam-rs/pam/src/module.rs:32:27
   |
32 |                     data: Box<PamDataT>,
   |                           ^^^^^^^^^^^^^ not FFI-safe
   |
   = note: `#[warn(improper_ctypes)]` on by default
   = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
   = note: this struct has unspecified layout

warning: `extern` block uses type `std::boxed::Box<module::PamDataT>`, which is not FFI-safe
  --> /home/user/pam-rs/pam/src/module.rs:33:30
   |
33 |                       cleanup: extern "C" fn(pamh: *const PamHandle,
   |  ______________________________^
34 | |                                            data: Box<PamDataT>,
35 | |                                            error_status: PamResultCode))
   | |_______________________________________________________________________^ not FFI-safe
   |
   = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
   = note: this struct has unspecified layout

warning: functions generic over types or consts must be mangled
  --> /home/user/pam-rs/pam/src/module.rs:55:1
   |
54 |   #[no_mangle]
   |   ------------ help: remove this attribute
55 | / pub extern "C" fn cleanup<T>(_: *const PamHandle, c_data: Box<PamDataT>, _: PamResultCode) {
56 | |     unsafe {
57 | |         let data: Box<T> = mem::transmute(c_data);
58 | |         mem::drop(data);
59 | |     }
60 | | }
   | |_^
   |
   = note: `#[warn(no_mangle_generic_items)]` on by default

Can `Conv` be marked as `Send`?

I want to to create a pam module that can optionally take in input. For example, something like this: Either Wait 10 seconds or type "faster" and press enter to unlock.

The real use case is to write a fingerprint module (separate from libfprint).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.