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

gpservice crashes if can't bind to port #362

Closed
timp87 opened this issue May 10, 2024 · 2 comments
Closed

gpservice crashes if can't bind to port #362

timp87 opened this issue May 10, 2024 · 2 comments

Comments

@timp87
Copy link

timp87 commented May 10, 2024

Describe the bug
gpservice crashes if can't bind to port. For example, you can try starting it under non-root user.

https://github.com/yuezk/GlobalProtect-openconnect/blob/v2.2.1/apps/gpservice/src/ws_server.rs#L124

Expected behavior
Output a perror and exit.

Logs

[2024-05-10T03:07:09Z INFO  gpservice::cli] gpservice started: 2.2.1 (2024-05-08)
thread 'tokio-runtime-worker' panicked at apps/gpservice/src/ws_server.rs:124:58:
called `Result::unwrap()` on an `Err` value: Permission denied (os error 13)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Abort trap (core dumped)

Environment:

  • FreeBSD 13.3-RELEASE-p1 amd64
  • GlobalProtect-openconnect-2.2.1
@yuezk
Copy link
Owner

yuezk commented May 10, 2024

gpservice is supposed to be run as root because connect the VPN needs the root permission.

@timp87
Copy link
Author

timp87 commented May 10, 2024

No doubt. But it should not just crash.

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

No branches or pull requests

2 participants