Skip to content

Conversation

@msexxeta
Copy link
Contributor

Changes

This PR improves the sudo implementation and adds a new --disableSudo flag:

Features

  • Replace complex stdio password piping with printf approach for simpler and more reliable sudo password handling
  • Add support for su elevation with persistent root shell
  • Add --disableSudo flag to optionally disable sudo functionality
  • Add comprehensive sudo-exec tests with su support

Documentation

  • Add documentation for --disableSudo flag
  • Update sudo-exec tool documentation
  • Add documentation for sudo and su password parameters
  • Add examples for sudo and su usage

Testing

  • Create new focused sudo-exec.test.ts file
  • Add tests for sudo authentication scenarios
  • Add su elevation test setup and verification
  • Enable sudo access in test environment

Docker

  • Add SUDO_ACCESS=true to enable sudo in test environment

- Replace complex stdio password piping with printf approach
- Add support for su elevation with persistent root shell
- Add --disableSudo flag to optionally disable sudo functionality
- Update documentation with new parameters and examples
- Add comprehensive sudo-exec tests with su support
@msexxeta msexxeta mentioned this pull request Oct 31, 2025
@tufantunc tufantunc self-assigned this Nov 2, 2025
@tufantunc
Copy link
Owner

Hi @msexxeta ,
there is a type error in ci tests, can you fix it?

@msexxeta
Copy link
Contributor Author

msexxeta commented Nov 3, 2025

my bad, didn't check tsc. fixed

@msexxeta
Copy link
Contributor Author

msexxeta commented Nov 6, 2025

you're not using the docker-compose in the tests, that's why they fail, need to add that env variable to have sudo access.

@tufantunc tufantunc merged commit d18231b into tufantunc:main Nov 6, 2025
2 checks passed
@tufantunc
Copy link
Owner

Looks cool, thanks for your contribution. Creating new version for npm in a minute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants