[INFO] crate sudo_pair 1.0.0 is already in cache [INFO] documenting sudo_pair-1.0.0 against try#66dfc4e010913fbed0c4ea91fc2c010004b0f441 for pr-73566 [INFO] extracting crate sudo_pair 1.0.0 into /workspace/builds/worker-9/source [INFO] validating manifest of crates.io crate sudo_pair 1.0.0 on toolchain 66dfc4e010913fbed0c4ea91fc2c010004b0f441 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+66dfc4e010913fbed0c4ea91fc2c010004b0f441" "read-manifest" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] started tweaking crates.io crate sudo_pair 1.0.0 [INFO] finished tweaking crates.io crate sudo_pair 1.0.0 [INFO] tweaked toml for crates.io crate sudo_pair 1.0.0 written to /workspace/builds/worker-9/source/Cargo.toml [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+66dfc4e010913fbed0c4ea91fc2c010004b0f441" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update", kill_on_drop: false }` [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+66dfc4e010913fbed0c4ea91fc2c010004b0f441" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-9/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-9/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=0" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--network" "none" "rustops/crates-build-env@sha256:819119df93c0f5eca3f29186f14981ef29945a311854d7222af07488600a2584" "/opt/rustwide/cargo-home/bin/cargo" "+66dfc4e010913fbed0c4ea91fc2c010004b0f441" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 306d1b4ff10ccee14a5a676d7f9eeea4f1f0d7a49965eb6c2c2784fc1b7b72a7 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "306d1b4ff10ccee14a5a676d7f9eeea4f1f0d7a49965eb6c2c2784fc1b7b72a7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "306d1b4ff10ccee14a5a676d7f9eeea4f1f0d7a49965eb6c2c2784fc1b7b72a7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "306d1b4ff10ccee14a5a676d7f9eeea4f1f0d7a49965eb6c2c2784fc1b7b72a7", kill_on_drop: false }` [INFO] [stdout] 306d1b4ff10ccee14a5a676d7f9eeea4f1f0d7a49965eb6c2c2784fc1b7b72a7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-9/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-9/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=0" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--network" "none" "rustops/crates-build-env@sha256:819119df93c0f5eca3f29186f14981ef29945a311854d7222af07488600a2584" "/opt/rustwide/cargo-home/bin/cargo" "+66dfc4e010913fbed0c4ea91fc2c010004b0f441" "doc" "--frozen" "--no-deps" "--document-private-items" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0b280c39a3e99ccd9f66834de32795d9a70550b2f3cc37b33d935f82166138db [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "0b280c39a3e99ccd9f66834de32795d9a70550b2f3cc37b33d935f82166138db", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.71 [INFO] [stderr] Compiling memchr v2.3.3 [INFO] [stderr] Compiling unicode-xid v0.2.1 [INFO] [stderr] Compiling glob v0.3.0 [INFO] [stderr] Compiling cc v1.0.56 [INFO] [stderr] Compiling lazy_static v1.4.0 [INFO] [stderr] Compiling log v0.4.8 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Compiling unicode-width v0.1.8 [INFO] [stderr] Compiling quick-error v1.2.3 [INFO] [stderr] Compiling regex-syntax v0.6.18 [INFO] [stderr] Compiling cfg-if v0.1.10 [INFO] [stderr] Compiling ansi_term v0.11.0 [INFO] [stderr] Compiling vec_map v0.8.2 [INFO] [stderr] Compiling strsim v0.8.0 [INFO] [stderr] Compiling bindgen v0.54.0 [INFO] [stderr] Compiling termcolor v1.1.0 [INFO] [stderr] Checking gimli v0.21.0 [INFO] [stderr] Compiling lazycell v1.2.1 [INFO] [stderr] Compiling shlex v0.1.1 [INFO] [stderr] Compiling rustc-hash v1.1.0 [INFO] [stderr] Compiling peeking_take_while v0.1.2 [INFO] [stderr] Checking adler32 v1.1.0 [INFO] [stderr] Checking rustc-demangle v0.1.16 [INFO] [stderr] Checking object v0.20.0 [INFO] [stderr] Compiling failure_derive v0.1.8 [INFO] [stderr] Compiling nom v5.1.2 [INFO] [stderr] Compiling thread_local v1.0.1 [INFO] [stderr] Compiling humantime v1.3.0 [INFO] [stderr] Compiling textwrap v0.11.0 [INFO] [stderr] Compiling proc-macro2 v1.0.18 [INFO] [stderr] Checking miniz_oxide v0.3.7 [INFO] [stderr] Compiling aho-corasick v0.7.13 [INFO] [stderr] Compiling clang-sys v0.29.3 [INFO] [stderr] Compiling quote v1.0.7 [INFO] [stderr] Compiling libloading v0.5.2 [INFO] [stderr] Compiling syn v1.0.33 [INFO] [stderr] Compiling atty v0.2.14 [INFO] [stderr] Compiling which v3.1.1 [INFO] [stderr] Compiling clap v2.33.1 [INFO] [stderr] Compiling regex v1.3.9 [INFO] [stderr] Checking addr2line v0.12.2 [INFO] [stderr] Compiling cexpr v0.4.0 [INFO] [stderr] Checking backtrace v0.3.49 [INFO] [stderr] Checking error-chain v0.12.2 [INFO] [stderr] Compiling env_logger v0.7.1 [INFO] [stderr] Compiling synstructure v0.12.4 [INFO] [stderr] Checking failure v0.1.8 [INFO] [stderr] Compiling sudo_plugin-sys v1.2.1 [INFO] [stderr] Checking sudo_plugin v1.2.0 [INFO] [stderr] Documenting sudo_pair v1.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | / //! sudo IO-plugin to require a live human pair. [INFO] [stdout] 16 | | //! [INFO] [stdout] 17 | | //! This plugin implements dual control for `sudo`, requiring that [INFO] [stdout] 18 | | //! another engineer approve and monitor any privileged sessions. [INFO] [stdout] | |_________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | #![warn(rustdoc)] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] = note: `#[warn(missing_doc_code_examples)]` implied by `#[warn(rustdoc)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:97:1 [INFO] [stdout] | [INFO] [stdout] 97 | / struct SudoPair { [INFO] [stdout] 98 | | plugin: &'static Plugin, [INFO] [stdout] 99 | | options: PluginOptions, [INFO] [stdout] 100 | | socket: Option, [INFO] [stdout] 101 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | plugin: &'static Plugin, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | options: PluginOptions, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:100:5 [INFO] [stdout] | [INFO] [stdout] 100 | socket: Option, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:550:1 [INFO] [stdout] | [INFO] [stdout] 550 | / struct PluginOptions { [INFO] [stdout] 551 | | /// `binary_path` is the location of the approval binary, so that we [INFO] [stdout] 552 | | /// can bypass the approval process for invoking it. [INFO] [stdout] 553 | | /// [INFO] [stdout] ... | [INFO] [stdout] 595 | | gids_exempted: HashSet, [INFO] [stdout] 596 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:551:5 [INFO] [stdout] | [INFO] [stdout] 551 | / /// `binary_path` is the location of the approval binary, so that we [INFO] [stdout] 552 | | /// can bypass the approval process for invoking it. [INFO] [stdout] 553 | | /// [INFO] [stdout] 554 | | /// Default: `"/usr/bin/sudo_approve"` [INFO] [stdout] | |__________________________________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:557:5 [INFO] [stdout] | [INFO] [stdout] 557 | / /// `user_prompt_path` is the location of the prompt template to [INFO] [stdout] 558 | | /// display to the user invoking sudo; if no template is found at [INFO] [stdout] 559 | | /// this location, an extremely minimal default will be printed. [INFO] [stdout] 560 | | /// [INFO] [stdout] 561 | | /// Default: `"/etc/sudo_pair.prompt.user"` [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:564:5 [INFO] [stdout] | [INFO] [stdout] 564 | / /// `pair_prompt_path` is the location of the prompt template to [INFO] [stdout] 565 | | /// display to the user being asked to approve the sudo session; if [INFO] [stdout] 566 | | /// no template is found at this location, an extremely minimal [INFO] [stdout] 567 | | /// default will be printed. [INFO] [stdout] 568 | | /// [INFO] [stdout] 569 | | /// Default: `"/etc/sudo_pair.prompt.pair"` [INFO] [stdout] | |_______________________________________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:572:5 [INFO] [stdout] | [INFO] [stdout] 572 | / /// `socket_dir` is the path where this plugin will store sockets for [INFO] [stdout] 573 | | /// sessions that are pending approval. [INFO] [stdout] 574 | | /// [INFO] [stdout] 575 | | /// Default: `"/var/run/sudo_pair"` [INFO] [stdout] | |_______________________________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:578:5 [INFO] [stdout] | [INFO] [stdout] 578 | / /// `gids_enforced` is a comma-separated list of gids that sudo_pair [INFO] [stdout] 579 | | /// will gate access to. If a user is `sudo`ing to a user that is a [INFO] [stdout] 580 | | /// member of one of these groups, they will be required to have a [INFO] [stdout] 581 | | /// pair approve their session. [INFO] [stdout] 582 | | /// [INFO] [stdout] 583 | | /// Default: `[0]` (e.g., root) [INFO] [stdout] | |___________________________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:586:5 [INFO] [stdout] | [INFO] [stdout] 586 | / /// `gids_exempted` is a comma-separated list of gids whose users [INFO] [stdout] 587 | | /// will be exempted from the requirements of sudo_pair. Note that [INFO] [stdout] 588 | | /// this is not the opposite of the `gids_enforced` flag. Whereas [INFO] [stdout] 589 | | /// `gids_enforced` gates access *to* groups, `gids_exempted` [INFO] [stdout] ... | [INFO] [stdout] 593 | | /// [INFO] [stdout] 594 | | /// Default: `[]` (however, root is *always* exempt) [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / use std::fmt::{Display, Formatter, Result as FmtResult}; [INFO] [stdout] 2 | | use std::result::Result as StdResult; [INFO] [stdout] 3 | | [INFO] [stdout] 4 | | use failure::{Context, Fail}; [INFO] [stdout] ... | [INFO] [stdout] 86 | | } [INFO] [stdout] 87 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:41:1 [INFO] [stdout] | [INFO] [stdout] 41 | / pub(crate) struct Error { [INFO] [stdout] 42 | | inner: Context, [INFO] [stdout] 43 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:42:5 [INFO] [stdout] | [INFO] [stdout] 42 | inner: Context, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / pub(crate) enum ErrorKind { [INFO] [stdout] 15 | | CommunicationError, [INFO] [stdout] 16 | | SessionDeclined, [INFO] [stdout] 17 | | SessionTerminated, [INFO] [stdout] 18 | | StdinRedirected, [INFO] [stdout] 19 | | SudoToUserAndGroup, [INFO] [stdout] 20 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | CommunicationError, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | SessionDeclined, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | SessionTerminated, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | StdinRedirected, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | SudoToUserAndGroup, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | pub(crate) type Result = StdResult; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | / impl ErrorKind { [INFO] [stdout] 23 | | fn as_str(self) -> &'static str { [INFO] [stdout] 24 | | match self { [INFO] [stdout] 25 | | ErrorKind::CommunicationError => "couldn't establish communications with the pair", [INFO] [stdout] ... | [INFO] [stdout] 31 | | } [INFO] [stdout] 32 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / fn as_str(self) -> &'static str { [INFO] [stdout] 24 | | match self { [INFO] [stdout] 25 | | ErrorKind::CommunicationError => "couldn't establish communications with the pair", [INFO] [stdout] 26 | | ErrorKind::SessionDeclined => "pair declined the session", [INFO] [stdout] ... | [INFO] [stdout] 30 | | } [INFO] [stdout] 31 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | / use std::collections::HashMap; [INFO] [stdout] 16 | | [INFO] [stdout] 17 | | const DEFAULT_ESCAPE_BYTE : u8 = b'%'; [INFO] [stdout] 18 | | [INFO] [stdout] ... | [INFO] [stdout] 267 | | } [INFO] [stdout] 268 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:19:1 [INFO] [stdout] | [INFO] [stdout] 19 | / pub(crate) struct Spec { [INFO] [stdout] 20 | | expansions: HashMap>, [INFO] [stdout] 21 | | escape: u8, [INFO] [stdout] 22 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | expansions: HashMap>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | escape: u8, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | const DEFAULT_ESCAPE_BYTE : u8 = b'%'; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / impl Spec { [INFO] [stdout] 25 | | pub(crate) fn new() -> Self { [INFO] [stdout] 26 | | Self::default() [INFO] [stdout] 27 | | } [INFO] [stdout] ... | [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / pub(crate) fn new() -> Self { [INFO] [stdout] 26 | | Self::default() [INFO] [stdout] 27 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / pub(crate) fn with_escape(escape: u8) -> Self { [INFO] [stdout] 30 | | Self { escape, .. Self::new() } [INFO] [stdout] 31 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | / pub(crate) fn replace>>(&mut self, literal: u8, replacement: T) { [INFO] [stdout] 34 | | let _ = self.expansions.insert(literal, replacement.into()); [INFO] [stdout] 35 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / pub(crate) fn expand(&self, template: &[u8]) -> Vec { [INFO] [stdout] 38 | | // the expanded result is likely to be at least as long as the [INFO] [stdout] 39 | | // template; if we go a little over, it's not a big deal [INFO] [stdout] 40 | | let mut result = Vec::with_capacity(template.len()); [INFO] [stdout] ... | [INFO] [stdout] 73 | | result [INFO] [stdout] 74 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | / #![cfg_attr(feature="cargo-clippy", allow(clippy::similar_names))] [INFO] [stdout] 19 | | [INFO] [stdout] 20 | | use std::ffi::CString; [INFO] [stdout] 21 | | use std::fs; [INFO] [stdout] ... | [INFO] [stdout] 302 | | Ok(()) [INFO] [stdout] 303 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | / pub(crate) struct Socket { [INFO] [stdout] 34 | | socket: UnixStream, [INFO] [stdout] 35 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | socket: UnixStream, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:255:1 [INFO] [stdout] | [INFO] [stdout] 255 | / /// Sets up a handler for Ctrl-C (SIGINT) that's a no-op, but with the [INFO] [stdout] 256 | | /// `SA_RESTART` flag disabled, for the duration of the passed function [INFO] [stdout] 257 | | /// call. [INFO] [stdout] 258 | | /// [INFO] [stdout] 259 | | /// Disabling `SA_RESTART` ensures that blocking calls like `accept(2)` [INFO] [stdout] 260 | | /// will be terminated upon receipt on the signal instead of [INFO] [stdout] 261 | | /// automatically resuming. [INFO] [stdout] | |___________________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:290:1 [INFO] [stdout] | [INFO] [stdout] 290 | / /// Installs the new handler for the signal identified by `sig` if `new` [INFO] [stdout] 291 | | /// is non-null. Returns the preexisting handler for the signal if `old` [INFO] [stdout] 292 | | /// is non-null. [INFO] [stdout] | |________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:37:1 [INFO] [stdout] | [INFO] [stdout] 37 | / impl Socket { [INFO] [stdout] 38 | | pub(crate) fn open>( [INFO] [stdout] 39 | | path: P, [INFO] [stdout] 40 | | uid: uid_t, [INFO] [stdout] ... | [INFO] [stdout] 226 | | } [INFO] [stdout] 227 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | / pub(crate) fn open>( [INFO] [stdout] 39 | | path: P, [INFO] [stdout] 40 | | uid: uid_t, [INFO] [stdout] 41 | | gid: gid_t, [INFO] [stdout] ... | [INFO] [stdout] 124 | | socket [INFO] [stdout] 125 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / pub(crate) fn close(&mut self) -> Result<()> { [INFO] [stdout] 128 | | self.socket.shutdown(Shutdown::Both) [INFO] [stdout] 129 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 131 | / fn unlink(path: &Path) -> Result<()> { [INFO] [stdout] 132 | | match fs::metadata(&path).map(|md| md.file_type().is_socket()) { [INFO] [stdout] 133 | | // file exists, is a socket; delete it [INFO] [stdout] 134 | | Ok(true) => fs::remove_file(path), [INFO] [stdout] ... | [INFO] [stdout] 147 | | } [INFO] [stdout] 148 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:150:5 [INFO] [stdout] | [INFO] [stdout] 150 | / fn enforce_ownership(path: &Path) -> Result<()> { [INFO] [stdout] 151 | | let parent = path.parent().ok_or_else(|| { [INFO] [stdout] 152 | | Error::new(ErrorKind::AlreadyExists, format!( [INFO] [stdout] 153 | | "couldn't determine permissions of the parent directory for {}", [INFO] [stdout] ... | [INFO] [stdout] 225 | | Ok(()) [INFO] [stdout] 226 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:78:1 [INFO] [stdout] | [INFO] [stdout] 78 | const DEFAULT_BINARY_PATH : &str = "/usr/bin/sudo_approve"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:79:1 [INFO] [stdout] | [INFO] [stdout] 79 | const DEFAULT_USER_PROMPT_PATH : &str = "/etc/sudo_pair.prompt.user"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | const DEFAULT_PAIR_PROMPT_PATH : &str = "/etc/sudo_pair.prompt.pair"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:81:1 [INFO] [stdout] | [INFO] [stdout] 81 | const DEFAULT_SOCKET_DIR : &str = "/var/run/sudo_pair"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:82:1 [INFO] [stdout] | [INFO] [stdout] 82 | const DEFAULT_GIDS_ENFORCED : [gid_t; 1] = [0]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:84:1 [INFO] [stdout] | [INFO] [stdout] 84 | const DEFAULT_USER_PROMPT : &[u8] = b"%B '%p %u'\n"; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:85:1 [INFO] [stdout] | [INFO] [stdout] 85 | const DEFAULT_PAIR_PROMPT : &[u8] = b"%U@%h:%d$ %C\ny/n? [n]: "; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:103:1 [INFO] [stdout] | [INFO] [stdout] 103 | / impl SudoPair { [INFO] [stdout] 104 | | fn open(plugin: &'static Plugin) -> Result { [INFO] [stdout] 105 | | // TODO: convert all outgoing errors to be unauthorized errors [INFO] [stdout] 106 | | let mut pair = Self { [INFO] [stdout] ... | [INFO] [stdout] 546 | | } [INFO] [stdout] 547 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | / fn open(plugin: &'static Plugin) -> Result { [INFO] [stdout] 105 | | // TODO: convert all outgoing errors to be unauthorized errors [INFO] [stdout] 106 | | let mut pair = Self { [INFO] [stdout] 107 | | plugin, [INFO] [stdout] ... | [INFO] [stdout] 151 | | Ok(pair) [INFO] [stdout] 152 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:154:5 [INFO] [stdout] | [INFO] [stdout] 154 | / fn close(&mut self, _: i64, _: i64) { [INFO] [stdout] 155 | | // if we have a socket, close it [INFO] [stdout] 156 | | let _ = self.socket.as_mut().map(Socket::close); [INFO] [stdout] 157 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 159 | / fn log_ttyout(&mut self, log: &[u8]) -> Result<()> { [INFO] [stdout] 160 | | if !self.plugin.command_info.iolog_ttyout { [INFO] [stdout] 161 | | return Ok(()) [INFO] [stdout] 162 | | } [INFO] [stdout] 163 | | [INFO] [stdout] 164 | | self.log_output(log) [INFO] [stdout] 165 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | / fn log_stdout(&mut self, log: &[u8]) -> Result<()> { [INFO] [stdout] 168 | | if !self.plugin.command_info.iolog_stdout { [INFO] [stdout] 169 | | return Ok(()) [INFO] [stdout] 170 | | } [INFO] [stdout] 171 | | [INFO] [stdout] 172 | | self.log_output(log) [INFO] [stdout] 173 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:175:5 [INFO] [stdout] | [INFO] [stdout] 175 | / fn log_stderr(&mut self, log: &[u8]) -> Result<()> { [INFO] [stdout] 176 | | if !self.plugin.command_info.iolog_stderr { [INFO] [stdout] 177 | | return Ok(()) [INFO] [stdout] 178 | | } [INFO] [stdout] 179 | | [INFO] [stdout] 180 | | self.log_output(log) [INFO] [stdout] 181 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:183:5 [INFO] [stdout] | [INFO] [stdout] 183 | / fn log_output(&mut self, log: &[u8]) -> Result<()> { [INFO] [stdout] 184 | | // if we have a socket, write to it [INFO] [stdout] 185 | | self.socket.as_mut().map_or(Ok(()), |socket| { [INFO] [stdout] 186 | | socket.write_all(log) [INFO] [stdout] ... | [INFO] [stdout] 189 | | Ok(()) [INFO] [stdout] 190 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:192:5 [INFO] [stdout] | [INFO] [stdout] 192 | / fn log_disabled(&mut self, _: &[u8]) -> Result<()> { [INFO] [stdout] 193 | | // if we're exempt, don't disable stdin/stdout/stderr [INFO] [stdout] 194 | | if self.is_exempt() { [INFO] [stdout] 195 | | return Ok(()); [INFO] [stdout] ... | [INFO] [stdout] 198 | | Err(ErrorKind::StdinRedirected.into()) [INFO] [stdout] 199 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:201:5 [INFO] [stdout] | [INFO] [stdout] 201 | / fn local_pair_prompt(&self, template_spec: &Spec) { [INFO] [stdout] 202 | | // read the template from the file; if there's an error, use the [INFO] [stdout] 203 | | // default template instead [INFO] [stdout] 204 | | let template : Vec = File::open(&self.options.user_prompt_path) [INFO] [stdout] ... | [INFO] [stdout] 240 | | .ok_or_else(||self.plugin.stderr().write_all(&prompt)); [INFO] [stdout] 241 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:243:5 [INFO] [stdout] | [INFO] [stdout] 243 | / fn remote_pair_connect(&mut self) -> Result<()> { [INFO] [stdout] 244 | | if self.socket.is_some() { [INFO] [stdout] 245 | | return Ok(()); [INFO] [stdout] 246 | | } [INFO] [stdout] ... | [INFO] [stdout] 258 | | Ok(()) [INFO] [stdout] 259 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:261:5 [INFO] [stdout] | [INFO] [stdout] 261 | / fn remote_pair_prompt(&mut self, template_spec: &Spec) -> Result<()> { [INFO] [stdout] 262 | | // read the template from the file; if there's an error, use the [INFO] [stdout] 263 | | // default template instead [INFO] [stdout] 264 | | let template : Vec = File::open(&self.options.pair_prompt_path) [INFO] [stdout] ... | [INFO] [stdout] 302 | | } [INFO] [stdout] 303 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:305:5 [INFO] [stdout] | [INFO] [stdout] 305 | / fn is_exempt(&self) -> bool { [INFO] [stdout] 306 | | // root is always exempt [INFO] [stdout] 307 | | if self.is_sudoing_from_root() { [INFO] [stdout] 308 | | return true; [INFO] [stdout] ... | [INFO] [stdout] 340 | | false [INFO] [stdout] 341 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:343:5 [INFO] [stdout] | [INFO] [stdout] 343 | / fn is_sudoing_from_root(&self) -> bool { [INFO] [stdout] 344 | | // theoretically, root's `uid` should be 0, but it's probably [INFO] [stdout] 345 | | // safest to check whatever user `sudo` is running as since sudo [INFO] [stdout] 346 | | // is pretty much by definition going to be running setuid; [INFO] [stdout] ... | [INFO] [stdout] 352 | | self.plugin.user_info.uid == self.plugin.user_info.euid [INFO] [stdout] 353 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:355:5 [INFO] [stdout] | [INFO] [stdout] 355 | / fn is_sudoing_to_themselves(&self) -> bool { [INFO] [stdout] 356 | | // if they're not sudoing to a new uid or to a new gid, they're [INFO] [stdout] 357 | | // just becoming themselves... right? [INFO] [stdout] 358 | | if !self.is_sudoing_to_user() && !self.is_sudoing_to_group() { [INFO] [stdout] ... | [INFO] [stdout] 367 | | false [INFO] [stdout] 368 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:370:5 [INFO] [stdout] | [INFO] [stdout] 370 | / fn is_sudoing_approval_command(&self) -> bool { [INFO] [stdout] 371 | | self.plugin.command_info.command == self.options.binary_path [INFO] [stdout] 372 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:374:5 [INFO] [stdout] | [INFO] [stdout] 374 | / /// [INFO] [stdout] 375 | | /// Returns true if the policy plugin has not given us any [INFO] [stdout] 376 | | /// facilities to log output for. [INFO] [stdout] 377 | | /// [INFO] [stdout] | |_______^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:390:5 [INFO] [stdout] | [INFO] [stdout] 390 | / fn is_sudoing_to_user_and_group(&self) -> bool { [INFO] [stdout] 391 | | // if a user is doing `sudo -u ${u} -g ${g}`, we don't have a [INFO] [stdout] 392 | | // way to ensure that the pair can act with permissions of both [INFO] [stdout] 393 | | // the new user and the new group; ignoring this would allow [INFO] [stdout] ... | [INFO] [stdout] 405 | | false [INFO] [stdout] 406 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:408:5 [INFO] [stdout] | [INFO] [stdout] 408 | / fn is_sudoing_from_exempted_gid(&self) -> bool { [INFO] [stdout] 409 | | !self.options.gids_exempted.is_disjoint( [INFO] [stdout] 410 | | &self.plugin.user_info.groups.iter().cloned().collect() [INFO] [stdout] 411 | | ) [INFO] [stdout] 412 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:414:5 [INFO] [stdout] | [INFO] [stdout] 414 | / fn is_sudoing_to_enforced_gid(&self) -> bool { [INFO] [stdout] 415 | | !self.options.gids_enforced.is_disjoint( [INFO] [stdout] 416 | | &self.plugin.runas_gids() [INFO] [stdout] 417 | | ) [INFO] [stdout] 418 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:420:5 [INFO] [stdout] | [INFO] [stdout] 420 | / fn is_sudoing_to_user(&self) -> bool { [INFO] [stdout] 421 | | self.plugin.user_info.uid != self.plugin.command_info.runas_euid [INFO] [stdout] 422 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:424:5 [INFO] [stdout] | [INFO] [stdout] 424 | / fn is_sudoing_to_group(&self) -> bool { [INFO] [stdout] 425 | | self.plugin.user_info.gid != self.plugin.command_info.runas_egid [INFO] [stdout] 426 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:429:5 [INFO] [stdout] | [INFO] [stdout] 429 | / fn is_sudoing_to_explicit_group(&self) -> bool { [INFO] [stdout] 430 | | self.plugin.settings.runas_group.is_some() [INFO] [stdout] 431 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:433:5 [INFO] [stdout] | [INFO] [stdout] 433 | / fn socket_path(&self) -> PathBuf { [INFO] [stdout] 434 | | // we encode the originating `uid` into the pathname since [INFO] [stdout] 435 | | // there's no other (easy) way for the approval command to probe [INFO] [stdout] 436 | | // for this information [INFO] [stdout] ... | [INFO] [stdout] 447 | | ) [INFO] [stdout] 448 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:450:5 [INFO] [stdout] | [INFO] [stdout] 450 | / fn socket_uid(&self) -> uid_t { [INFO] [stdout] 451 | | // we explicitly want to have the socket owned by the root user [INFO] [stdout] 452 | | // if we're doing `sudo -g`, so that the sudoing user can't [INFO] [stdout] 453 | | // silently self-approve by manually connecting to the socket [INFO] [stdout] ... | [INFO] [stdout] 462 | | } [INFO] [stdout] 463 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:465:5 [INFO] [stdout] | [INFO] [stdout] 465 | / fn socket_gid(&self) -> gid_t { [INFO] [stdout] 466 | | // this should only be changed if the user is sudoing to a group [INFO] [stdout] 467 | | // explicitly, not only if they're gaining a new primary `gid` [INFO] [stdout] 468 | | if self.is_sudoing_to_explicit_group() { [INFO] [stdout] ... | [INFO] [stdout] 475 | | } [INFO] [stdout] 476 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:478:5 [INFO] [stdout] | [INFO] [stdout] 478 | / fn socket_mode(&self) -> mode_t { [INFO] [stdout] 479 | | // if the user is sudoing to a new `euid`, we require the [INFO] [stdout] 480 | | // approver to also be able to act as the same `euid`; this is [INFO] [stdout] 481 | | // the first check, because if euid changes egid is also likely [INFO] [stdout] ... | [INFO] [stdout] 501 | | unreachable!("cannot determine if we're sudoing to a user or group") [INFO] [stdout] 502 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:504:5 [INFO] [stdout] | [INFO] [stdout] 504 | / fn template_spec(&self) -> Spec { [INFO] [stdout] 505 | | // TODO: document these somewhere useful for users of this plugin [INFO] [stdout] 506 | | // TODO: provide groupname of gid? [INFO] [stdout] 507 | | // TODO: provide username of runas_euid? [INFO] [stdout] ... | [INFO] [stdout] 545 | | spec [INFO] [stdout] 546 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:598:1 [INFO] [stdout] | [INFO] [stdout] 598 | / impl PluginOptions { [INFO] [stdout] 599 | | fn binary_name(&self) -> &[u8] { [INFO] [stdout] 600 | | self.binary_path.file_name().unwrap_or_else(|| [INFO] [stdout] 601 | | self.binary_path.as_os_str() [INFO] [stdout] 602 | | ).as_bytes() [INFO] [stdout] 603 | | } [INFO] [stdout] 604 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:599:5 [INFO] [stdout] | [INFO] [stdout] 599 | / fn binary_name(&self) -> &[u8] { [INFO] [stdout] 600 | | self.binary_path.file_name().unwrap_or_else(|| [INFO] [stdout] 601 | | self.binary_path.as_os_str() [INFO] [stdout] 602 | | ).as_bytes() [INFO] [stdout] 603 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:229:1 [INFO] [stdout] | [INFO] [stdout] 229 | / impl Drop for Socket { [INFO] [stdout] 230 | | fn drop(&mut self) { [INFO] [stdout] 231 | | let _ = self.close(); [INFO] [stdout] 232 | | } [INFO] [stdout] 233 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:230:5 [INFO] [stdout] | [INFO] [stdout] 230 | / fn drop(&mut self) { [INFO] [stdout] 231 | | let _ = self.close(); [INFO] [stdout] 232 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:53:1 [INFO] [stdout] | [INFO] [stdout] 53 | / impl From for Error { [INFO] [stdout] 54 | | fn from(kind: ErrorKind) -> Self { [INFO] [stdout] 55 | | Self::from(Context::new(kind)) [INFO] [stdout] 56 | | } [INFO] [stdout] 57 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / fn from(kind: ErrorKind) -> Self { [INFO] [stdout] 55 | | Self::from(Context::new(kind)) [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:59:1 [INFO] [stdout] | [INFO] [stdout] 59 | / impl From> for Error { [INFO] [stdout] 60 | | fn from(inner: Context) -> Self { [INFO] [stdout] 61 | | Self { inner } [INFO] [stdout] 62 | | } [INFO] [stdout] 63 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | / fn from(inner: Context) -> Self { [INFO] [stdout] 61 | | Self { inner } [INFO] [stdout] 62 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:65:1 [INFO] [stdout] | [INFO] [stdout] 65 | / /// [INFO] [stdout] 66 | | /// Implements conversion from `Error` to `sudo_plugin::errors::Error`. [INFO] [stdout] 67 | | /// Since this plugin is security-sensitive, all errors should be [INFO] [stdout] 68 | | /// converted to an Unauthorized error. [INFO] [stdout] 69 | | /// [INFO] [stdout] | |___^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:71:5 [INFO] [stdout] | [INFO] [stdout] 71 | / fn from(error: Error) -> Self { [INFO] [stdout] 72 | | Self::with_chain( [INFO] [stdout] 73 | | error.compat(), [INFO] [stdout] 74 | | SudoPluginErrorKind::Unauthorized [INFO] [stdout] 75 | | ) [INFO] [stdout] 76 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:79:1 [INFO] [stdout] | [INFO] [stdout] 79 | / /// [INFO] [stdout] 80 | | /// Also allow converting directly from an `ErrorKind`, which will be [INFO] [stdout] 81 | | /// implicitly wrapped in a new `Error`. [INFO] [stdout] 82 | | /// [INFO] [stdout] | |___^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:84:5 [INFO] [stdout] | [INFO] [stdout] 84 | / fn from(kind: ErrorKind) -> Self { [INFO] [stdout] 85 | | Self::from(Error::from(kind)) [INFO] [stdout] 86 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:86:1 [INFO] [stdout] | [INFO] [stdout] 86 | / impl From>> for Spec { [INFO] [stdout] 87 | | fn from(expansions: HashMap>) -> Self { [INFO] [stdout] 88 | | Self { expansions, .. Self::new() } [INFO] [stdout] 89 | | } [INFO] [stdout] 90 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:87:5 [INFO] [stdout] | [INFO] [stdout] 87 | / fn from(expansions: HashMap>) -> Self { [INFO] [stdout] 88 | | Self { expansions, .. Self::new() } [INFO] [stdout] 89 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:609:1 [INFO] [stdout] | [INFO] [stdout] 609 | / impl<'a> From<&'a OptionMap> for PluginOptions { [INFO] [stdout] 610 | | fn from(map: &'a OptionMap) -> Self { [INFO] [stdout] 611 | | Self { [INFO] [stdout] 612 | | binary_path: map.get("binary_path") [INFO] [stdout] ... | [INFO] [stdout] 630 | | } [INFO] [stdout] 631 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:610:5 [INFO] [stdout] | [INFO] [stdout] 610 | / fn from(map: &'a OptionMap) -> Self { [INFO] [stdout] 611 | | Self { [INFO] [stdout] 612 | | binary_path: map.get("binary_path") [INFO] [stdout] 613 | | .unwrap_or_else(|_| DEFAULT_BINARY_PATH.into()), [INFO] [stdout] ... | [INFO] [stdout] 629 | | } [INFO] [stdout] 630 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:77:1 [INFO] [stdout] | [INFO] [stdout] 77 | / impl Default for Spec { [INFO] [stdout] 78 | | fn default() -> Self { [INFO] [stdout] 79 | | Self { [INFO] [stdout] 80 | | expansions: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 83 | | } [INFO] [stdout] 84 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/template.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | / fn default() -> Self { [INFO] [stdout] 79 | | Self { [INFO] [stdout] 80 | | expansions: HashMap::new(), [INFO] [stdout] 81 | | escape: DEFAULT_ESCAPE_BYTE, [INFO] [stdout] 82 | | } [INFO] [stdout] 83 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:34:1 [INFO] [stdout] | [INFO] [stdout] 34 | / impl Display for ErrorKind { [INFO] [stdout] 35 | | fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { [INFO] [stdout] 36 | | self.as_str().fmt(f) [INFO] [stdout] 37 | | } [INFO] [stdout] 38 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:35:5 [INFO] [stdout] | [INFO] [stdout] 35 | / fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { [INFO] [stdout] 36 | | self.as_str().fmt(f) [INFO] [stdout] 37 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:45:1 [INFO] [stdout] | [INFO] [stdout] 45 | / impl Display for Error { [INFO] [stdout] 46 | | fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { [INFO] [stdout] 47 | | self.inner.fmt(f) [INFO] [stdout] 48 | | } [INFO] [stdout] 49 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | / fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { [INFO] [stdout] 47 | | self.inner.fmt(f) [INFO] [stdout] 48 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:235:1 [INFO] [stdout] | [INFO] [stdout] 235 | / impl Read for Socket { [INFO] [stdout] 236 | | fn read(&mut self, buf: &mut [u8]) -> Result { [INFO] [stdout] 237 | | // read() will block until someone writes on the other side [INFO] [stdout] 238 | | // of the socket, so we ensure that the signal handler for [INFO] [stdout] ... | [INFO] [stdout] 242 | | } [INFO] [stdout] 243 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:236:5 [INFO] [stdout] | [INFO] [stdout] 236 | / fn read(&mut self, buf: &mut [u8]) -> Result { [INFO] [stdout] 237 | | // read() will block until someone writes on the other side [INFO] [stdout] 238 | | // of the socket, so we ensure that the signal handler for [INFO] [stdout] 239 | | // Ctrl-C aborts the read instead of restarting it [INFO] [stdout] 240 | | // automatically [INFO] [stdout] 241 | | ctrl_c_aborts_syscalls(|| self.socket.read(buf) )? [INFO] [stdout] 242 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:245:1 [INFO] [stdout] | [INFO] [stdout] 245 | / impl Write for Socket { [INFO] [stdout] 246 | | fn write(&mut self, buf: &[u8]) -> Result { [INFO] [stdout] 247 | | ctrl_c_aborts_syscalls(|| self.socket.write(buf) )? [INFO] [stdout] 248 | | } [INFO] [stdout] ... | [INFO] [stdout] 252 | | } [INFO] [stdout] 253 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:246:5 [INFO] [stdout] | [INFO] [stdout] 246 | / fn write(&mut self, buf: &[u8]) -> Result { [INFO] [stdout] 247 | | ctrl_c_aborts_syscalls(|| self.socket.write(buf) )? [INFO] [stdout] 248 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/socket.rs:250:5 [INFO] [stdout] | [INFO] [stdout] 250 | / fn flush(&mut self) -> Result<()> { [INFO] [stdout] 251 | | ctrl_c_aborts_syscalls(|| self.socket.flush() )? [INFO] [stdout] 252 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/errors.rs:51:1 [INFO] [stdout] | [INFO] [stdout] 51 | impl Fail for Error {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 106 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1m 02s [INFO] running `Command { std: "docker" "inspect" "0b280c39a3e99ccd9f66834de32795d9a70550b2f3cc37b33d935f82166138db", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0b280c39a3e99ccd9f66834de32795d9a70550b2f3cc37b33d935f82166138db", kill_on_drop: false }` [INFO] [stdout] 0b280c39a3e99ccd9f66834de32795d9a70550b2f3cc37b33d935f82166138db