Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warns when running TGS as root #1882

Merged
merged 20 commits into from
Aug 21, 2024
Merged

Warns when running TGS as root #1882

merged 20 commits into from
Aug 21, 2024

Conversation

ZephyrTFA
Copy link
Contributor

@ZephyrTFA ZephyrTFA commented Aug 18, 2024

🆑
Running as root on Linux now issues a warning outside of Docker.
/🆑

Running any service under the root user when it is not a system service is not recommended. We already install under a dedicated user for the apt packages so we should warn, and in the future error out, when running as root.

@ZephyrTFA ZephyrTFA requested a review from Cyberboss as a code owner August 18, 2024 08:03
src/Tgstation.Server.Host/Program.cs Outdated Show resolved Hide resolved
src/Tgstation.Server.Host/Program.cs Outdated Show resolved Hide resolved
src/Tgstation.Server.Host/Program.cs Outdated Show resolved Hide resolved
@Cyberboss
Copy link
Member

Also, ngl, these webedits really make me want to go against my principle of only using merge commits.

@Cyberboss Cyberboss added the Logging Adding, removing, or lack of informational log output label Aug 18, 2024
@Cyberboss Cyberboss marked this pull request as draft August 18, 2024 13:39
@Cyberboss Cyberboss added the Posix Only Issue only applies to non-Windows deployments label Aug 18, 2024
move checking root to CheckSystemCompatibility
use Syscall internal getuid
@ZephyrTFA ZephyrTFA marked this pull request as ready for review August 18, 2024 17:28
@ZephyrTFA
Copy link
Contributor Author

Also, ngl, these webedits really make me want to go against my principle of only using merge commits.

not a single commit was a web edit; it was me struggling to get dotnet to actually build locally until I realized that I had to manually specify NoWindows as a configuration because it is not automatically detected

src/Tgstation.Server.Host/Components/InstanceManager.cs Outdated Show resolved Hide resolved
src/Tgstation.Server.Host/Program.cs Outdated Show resolved Hide resolved
@Cyberboss Cyberboss marked this pull request as draft August 18, 2024 18:53
@ZephyrTFA ZephyrTFA requested a review from Cyberboss August 19, 2024 03:52
@ZephyrTFA ZephyrTFA marked this pull request as ready for review August 19, 2024 03:52
@Cyberboss Cyberboss enabled auto-merge August 19, 2024 11:25
@Cyberboss Cyberboss added this to the v6.9.0 milestone Aug 19, 2024
@Cyberboss Cyberboss added Logging Adding, removing, or lack of informational log output and removed Logging Adding, removing, or lack of informational log output labels Aug 19, 2024
@Cyberboss Cyberboss removed this from the v6.9.0 milestone Aug 19, 2024
Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 63.63636% with 4 lines in your changes missing coverage. Please review.

Project coverage is 95.81%. Comparing base (8496002) to head (531d870).
Report is 59 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1882      +/-   ##
==========================================
- Coverage   95.84%   95.81%   -0.03%     
==========================================
  Files         716      716              
  Lines      163744   163921     +177     
  Branches     3265     3263       -2     
==========================================
+ Hits       156939   157063     +124     
- Misses       6300     6353      +53     
  Partials      505      505              

@github-actions github-actions bot added size/M and removed size/S labels Aug 19, 2024
@Cyberboss Cyberboss added this to the v6.10.0 milestone Aug 20, 2024
@Cyberboss Cyberboss added Logging Adding, removing, or lack of informational log output and removed Logging Adding, removing, or lack of informational log output labels Aug 20, 2024
@Cyberboss Cyberboss disabled auto-merge August 20, 2024 11:09
@Cyberboss Cyberboss modified the milestone: v6.10.0 Aug 20, 2024
@Cyberboss Cyberboss merged commit bec568e into dev Aug 21, 2024
79 of 80 checks passed
@Cyberboss Cyberboss deleted the noroot branch August 21, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Logging Adding, removing, or lack of informational log output Posix Only Issue only applies to non-Windows deployments size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants