Commit Graph

3 Commits

Author SHA1 Message Date
Michael Pfaff cc71f5bb9a
Clean up code, add link to etc-passwd crate 2023-08-08 20:45:52 -04:00
Michael Pfaff 4214a999b8
Add TCP port forwarding
- Add TCP port forwarding (TODO reverse port forwarding and UDP port forwarding)
- Adjust logging
- Cleanup some code
- Remove call to `pam_open_session` because it only works once for each
  user before the process must be restarted
2023-06-09 18:42:24 -04:00
Michael Pfaff 7901a2a0b0
Work
- Automatic terminfo installation
    - Some very nasty code for this support. To be cleaned up at a
      later point.
- Seemingly correct privilege dropping/impersonation for spawning user
  shells
- Run the user's shell from /etc/passwd (but uses the libc api instead
  of accessing the file directly)
- Seems to have fixed the bug when using the fish shell that was mentioned in a previous commit
- A parser for the `id` command, used for determining the UID, GID, and
  supplementary groups of a given user by name (could get the UID and
  GID from the same API used to get the shell, but would miss out on
  supplementary groups).
- Temporarily disabled `Stream::Exec` until it can be brought up to
  speed with improvements made to `Stream::Shell`
- Added a workaround for an oddity in PAM authentication
    - Further testing has suggested that the "workaround" might have
      been a fluke/misunderstanding of the problem. Further testing is
      needed.
2023-06-08 00:33:56 -04:00