-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add Command
type
#258
Add Command
type
#258
Conversation
6d88b0d
to
69b0d7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor Pidfile
-> PidFile
needed, otherwise looks good to me!
Adds the `Command` type which allows projects to generate a properly formatted gvproxy command in the form of a string slice without hard-coding it. Adds the functionality to convert `Command` to a format in which os/exec can directly execute it. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
69b0d7d
to
4818381
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfergeau, jakecorrenti The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Ok, I'll make a new PR for the changes |
Fixes golangci-lint errors introduced by containers#258 Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Fixes golangci-lint errors introduced by containers#258 If `gosec` linting is enabled for the return statement in `Cmd`, an error will be returned: `G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)`. This error tries to make sure a user cannot provide a binary that could cause harm to the system. However, since the binary path is sanitized and the arguments are generated by gvproxy, this should be safe to ignore. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Fixes golangci-lint errors introduced by containers#258 If `gosec` linting is enabled for the return statement in `Cmd`, an error will be returned: `G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)`. This error tries to make sure a user cannot provide a binary that could cause harm to the system. We can't do much about this since the binary is externally provided. It is up to the caller to make sure they don't provide a "dangerous" binary. Therefore, it's ok that we ignore this linting error. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Fixes golangci-lint errors introduced by containers#258 If `gosec` linting is enabled for the return statement in `Cmd`, an error will be returned: `G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)`. This error tries to make sure a user cannot provide a binary that could cause harm to the system. We can't do much about this since the binary is externally provided. It is up to the caller to make sure they don't provide a "dangerous" binary. Therefore, it's ok that we ignore this linting error. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Fixes golangci-lint errors introduced by #258 If `gosec` linting is enabled for the return statement in `Cmd`, an error will be returned: `G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)`. This error tries to make sure a user cannot provide a binary that could cause harm to the system. We can't do much about this since the binary is externally provided. It is up to the caller to make sure they don't provide a "dangerous" binary. Therefore, it's ok that we ignore this linting error. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Converts the host networking code in `podman machine` to use the `GvproxyCommand` type introduced in containers/gvisor-tap-vsock#258 [NO NEW TESTS NEEDED] Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Adds the
Command
type which allows projects to generate a properly formatted gvproxy command in the form of a string slice without hard-coding it. Adds the functionality to convertCommand
to a format in which os/exec can directly execute it.