Skip to content

Releases: cloudposse-archives/sudosh

0.3.0: convert to github actions (#17)

01 Jul 03:32
79e21c0
Compare
Choose a tag to compare
* convert to github actions

* update readme

* upload artifacts

0.2.0

16 Jul 03:46
Compare
Choose a tag to compare
Add one more fallback to LOGNAME env (#15)

0.1.4: Migrate to README.yaml template (#12)

04 Jan 22:00
Compare
Choose a tag to compare
Migrate to README.yaml template

Avoid Recursive Shells

10 Mar 21:42
Compare
Choose a tag to compare

what

  • Export SHELL to match the desired shell, rather than the current sudosh shell
  • Do not use -s as it causes an unnecessary subshell
  • Emulate more closely the behavior of the desired shell (which is why we dropped the --)

why

  • When SHELL was set to the current sudosh wrapper shell, it would cause infinite loops for non-login shells (E.g. where a command was passed via ssh)
  • Better compatibility with system login shells

Try multiple methods to determine current user

10 Mar 19:56
Compare
Choose a tag to compare

what

  • Check USER, USERNAME, and whoami if we cannot call user.Current()

why

  • Alpine linux does not implement underlying sys call for user.Current()

Inherit Parent Environment

10 Mar 17:25
Compare
Choose a tag to compare

what

  • inherit parent environment
  • use default shell to execute shell commands

why

  • parent env is rather important because without it, ssh agent forwarding is impossible (e.g. SSH_AGENT_SOCK)

Implement a Shell Wrapper for `sudo`

28 Feb 16:56
Compare
Choose a tag to compare

what

  • implement a sudo wrapper that will sudo self

why

  • sudo provides built in session logging and ability to restrict commands that are run
  • when used as a login shell (e.g. chsh -s /usr/bin/sudosh foobar) you can force session logging for any user upon login