1. 22 Nov, 2021 2 commits
  2. 21 Nov, 2021 1 commit
    • SamwiseFilmore's avatar
      Refactor auth stuff to auth::Full · bc5d7bb5
      SamwiseFilmore authored
      Notably also removes the manual implementation of fmt::Debug from user
      in favor of deriving it, since auth::Full's implementation of Debug
      prevents it from outputting anything sensitive.
      bc5d7bb5
  3. 17 Nov, 2021 2 commits
    • SamwiseFilmore's avatar
      UserBuilder and improve GroupBuilder · 42a9cc67
      SamwiseFilmore authored
      More documentation...
      42a9cc67
    • SamwiseFilmore's avatar
      GroupBuilder and string checks · 87424c33
      SamwiseFilmore authored
      Added a GroupBuilder builder pattern for constructing groups instead of
      passing the elements as a list of things to AllGroups::add_group. Fields
      are verified as allowed names when added to the AllGroups.
      
      All strings are now checked for semicolons before being written to the
      database files in `/etc`. Error messages to match. This should prevent
      any misuse of the `User`/`Group` fields from yielding a bad system
      state.
      87424c33
  4. 05 Oct, 2021 1 commit
    • SamwiseFilmore's avatar
      Refactor auth types · e9909a12
      SamwiseFilmore authored
      While putting together a presentation on the way that I set up the
      marker types in this crate I came up with a "better" way of doing it,
      specifically to save a few words of mem per User by adding the hash to
      the type that is given as a parameter instead of as a field of User
      e9909a12
  5. 04 Oct, 2021 1 commit
  6. 01 Jan, 2021 1 commit
  7. 31 Dec, 2020 7 commits
  8. 06 Sep, 2020 1 commit
    • SamwiseFilmore's avatar
      A start for file locking · 4e840536
      SamwiseFilmore authored
      This compiles, but I think the tests are deadlocking somehow, even with
      an unlock being called explicitly in the AllGroups drop. More work is
      needed to make this work.
      4e840536
  9. 05 Sep, 2020 3 commits
    • SamwiseFilmore's avatar
      Documentation · 50da0cdf
      SamwiseFilmore authored
      Uhg.
      50da0cdf
    • SamwiseFilmore's avatar
      Fix Debug Impls; Remove FromStr; Fix group parsing · 3ab6a95f
      SamwiseFilmore authored
      - `FromStr` is no longer used for /etc/group parsing
      - All the structs in this crate will debug print correctly
      - Trailing whitespace/empty user lists for /etc/group entries are now
        parsed correctly. Tests added for those cases as well.
      3ab6a95f
    • SamwiseFilmore's avatar
      Remove dynamic auth checking · 466c2781
      SamwiseFilmore authored
      I never liked how I had to pass around a bool and ensure that the user
      had used the API correctly and panic if they hadn't. This commit adds a
      marker type to `User` and `AllUsers` that ensures that a user of the
      library cannot use authentication and other password related methods
      unless they've instantiated the user with authentication information.
      
      Got rid of the tests that ensured panics for incorrect usage of the API;
      incorrect API use is a compile-time error now.
      
      I removed `FromStr` for `User` and added it as a private method, later
      commits will do the same for `Group` and possibly transition away from
      `Display`.
      
      Documentation in the works.
      466c2781
  10. 26 Aug, 2020 3 commits
    • SamwiseFilmore's avatar
      0.3.5 · 00dd27f6
      SamwiseFilmore authored
      00dd27f6
    • SamwiseFilmore's avatar
      Make argon2 optional · 7d225631
      SamwiseFilmore authored
      Resolves #26.
      
      Since dirs is a reverse dependency of this crate and is used an awful
      lot, it's nice to have as small a dependency footprint as possible. dirs
      doesn't need the authentication stuff so we can drop a large number of
      deps. I imagine this will probably be useful in other contexts as well.
      7d225631
    • SamwiseFilmore's avatar
      Merge branch 'patch-1' into 'master' · 4afae396
      SamwiseFilmore authored
      Bump rust-argon2 dependency
      
      Closes #30
      
      See merge request !34
      4afae396
  11. 26 Mar, 2020 1 commit
  12. 22 Jan, 2020 3 commits
  13. 20 Jan, 2020 5 commits
  14. 01 Jan, 2020 1 commit
  15. 01 Sep, 2019 3 commits
  16. 07 Aug, 2019 2 commits
  17. 05 Feb, 2019 3 commits