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

Move raw example to deny_everything-raw #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ members = [
'sudo_plugin-sys',
'sudo_pair',

'examples/raw_plugin_api',
'examples/deny_everything-raw',
]
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ FROM build AS sudo_pair-deps
RUN cargo new --lib sudo_plugin-sys
RUN cargo new --lib sudo_plugin
RUN cargo new --lib sudo_pair
RUN cargo new --lib examples/raw_plugin_api

COPY Cargo.toml .
COPY sudo_plugin-sys/Cargo.toml ./sudo_plugin-sys
COPY sudo_plugin-sys/build.rs ./sudo_plugin-sys
COPY sudo_plugin-sys/src/bindings ./sudo_plugin-sys/src/bindings
COPY sudo_plugin/Cargo.toml ./sudo_plugin
COPY sudo_pair/Cargo.toml ./sudo_pair
COPY examples/raw_plugin_api/Cargo.toml ./examples/raw_plugin_api
RUN cargo new --lib examples/deny_everything-raw

COPY Cargo.toml .
COPY sudo_plugin-sys/Cargo.toml ./sudo_plugin-sys
COPY sudo_plugin-sys/build.rs ./sudo_plugin-sys
COPY sudo_plugin-sys/src/bindings ./sudo_plugin-sys/src/bindings
COPY sudo_plugin/Cargo.toml ./sudo_plugin
COPY sudo_pair/Cargo.toml ./sudo_pair
COPY examples/deny_everything-raw/Cargo.toml ./examples/deny_everything-raw

RUN --mount=type=cache,target=/tmp/cache/cargo \
--mount=type=cache,target=/tmp/cache/target,sharing=private \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = '2018'
authors = ['Stephen Touset <[email protected]>']
description = 'sudo approval plugin that denies everything'

homepage = 'https://github.com/square/sudo_pair/tree/master/examples/raw_plugin_api'
homepage = 'https://github.com/square/sudo_pair/tree/master/examples/deny_everything-raw'
repository = 'https://github.com/square/sudo_pair.git'
readme = 'README.md'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
//! An example minimal sudo approval plugin that denies all actions.
//!
//! # Usage
//!
//! ```
//! Plugin deny_everything deny_everything.so
//! ```

#![warn(future_incompatible)]
#![warn(nonstandard_style)]
Expand Down
24 changes: 12 additions & 12 deletions sudo_plugin-sys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ find a use-case that requires this, please [let us know][new-issue].

This project simply exposes the raw sudo plugin API bindings to Rust. While
these raw FFI bindings may be used directly, we encourage the use of a safe
wrapper such as the [sudo_plugin][sudo_plugin] project.
wrapper such as the [sudo_plugin] project.

For a demonstration of how to use the raw FFI bindings directly, see the
[raw_plugin_api][raw_plugin_api] example project.
[deny_everything-raw] example project.

## Contributions

Expand All @@ -70,13 +70,13 @@ openly.
`sudo_plugin-sys` is distributed under the terms of the [Apache License, Version
2.0][license].

[badge-build]: https://github.com/square/sudo_pair/actions/workflows/rust.yml
[badge-docs]: https://docs.rs/sudo_plugin-sys
[badge-crate]: https://crates.io/crates/sudo_plugin-sys
[license]: https://github.com/square/sudo_pair/blob/master/LICENSE-APACHE
[new-issue]: https://github.com/square/sudo_pair/issues/new
[raw_plugin_api]: ../examples/raw_plugin_api/
[sudo_plugin]: ../sudo_plugin/README.md
[square-cla]: https://cla-assistant.io/square/sudo_pair
[square-open-source]: https://square.github.io/
[sudo_plugin_man]: https://www.sudo.ws/man/sudo_plugin.man.html
[badge-build]: https://github.com/square/sudo_pair/actions/workflows/rust.yml
[badge-docs]: https://docs.rs/sudo_plugin-sys
[badge-crate]: https://crates.io/crates/sudo_plugin-sys
[license]: https://github.com/square/sudo_pair/blob/master/LICENSE-APACHE
[new-issue]: https://github.com/square/sudo_pair/issues/new
[deny_everything-raw]: ../examples/deny_everything-raw/
[sudo_plugin]: ../sudo_plugin/README.md
[square-cla]: https://cla-assistant.io/square/sudo_pair
[square-open-source]: https://square.github.io/
[sudo_plugin_man]: https://www.sudo.ws/man/sudo_plugin.man.html