Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Let hypercorn listen directly to privileged ports if run as root#9232

Merged
thrau merged 1 commit into
masterfrom
hypercorn-privileged-port-binding
Sep 26, 2023
Merged

Let hypercorn listen directly to privileged ports if run as root#9232
thrau merged 1 commit into
masterfrom
hypercorn-privileged-port-binding

Conversation

@dfangl
Copy link
Copy Markdown
Member

@dfangl dfangl commented Sep 26, 2023

Motivation

This is basically a continuation of #8948 and #9012.

We basically reintroduce hypercorn binding directly to the privileged ports, if run as root.

Additionally, we check the sys.net.ipv4.ip_unprivileged_port_start kernel parameter, to check the port start of unprivileged ports.

We will need to provide proper paths of error handling, to avoid #9012 again.

Changes

  • Bind hypercorn to privileged ports if root
  • Check the actual unprivileged port start instead of assuming 1024.

…roper check for unprivileged port range start
@dfangl dfangl added the semver: patch Non-breaking changes which can be included in patch releases label Sep 26, 2023
@dfangl dfangl added this to the Playground milestone Sep 26, 2023
Comment thread localstack/services/edge.py
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 83.013% (-0.05%) from 83.064% when pulling fe55d81 on hypercorn-privileged-port-binding into 9ccb39c on master.

@github-actions
Copy link
Copy Markdown

LocalStack Community integration with Pro

       2 files  ±0         2 suites  ±0   1h 14m 4s ⏱️ + 3m 6s
2 220 tests ±0  1 723 ✔️ ±0  497 💤 ±0  0 ±0 
2 221 runs  ±0  1 723 ✔️ ±0  498 💤 ±0  0 ±0 

Results for commit fe55d81. ± Comparison against base commit 9ccb39c.

@dfangl dfangl modified the milestones: Playground, 3.0 Sep 26, 2023
@dfangl dfangl marked this pull request as ready for review September 26, 2023 15:27
@dfangl dfangl requested a review from thrau as a code owner September 26, 2023 15:27
Copy link
Copy Markdown
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@thrau thrau merged commit ec27f3d into master Sep 26, 2023
@thrau thrau deleted the hypercorn-privileged-port-binding branch September 26, 2023 18:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants