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

Use cap-tempfile via cap-std-ext #4538

Merged
merged 1 commit into from
Aug 16, 2023
Merged
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
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ containers-image-proxy = "0.5.1"
# Explicitly force on libc
rustix = { version = "0.37", features = ["use-libc"] }
cap-primitives = "1.0.3"
cap-tempfile = "1.0.15"
chrono = { version = "0.4.26", features = ["serde"] }
clap = { version = "4.3", features = ["derive"] }
cxx = "1.0.101"
Expand Down
1 change: 1 addition & 0 deletions rust/src/builtins/scriptlet_intercept/groupadd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ fn generate_sysusers_fragment(rootdir: &Dir, groupname: &str, gid: Option<u32>)
#[cfg(test)]
mod test {
use super::*;
use cap_std_ext::cap_tempfile;
use std::io::Read;

#[test]
Expand Down
1 change: 1 addition & 0 deletions rust/src/builtins/scriptlet_intercept/useradd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ fn generate_sysusers_fragment(
#[cfg(test)]
mod test {
use super::*;
use cap_std_ext::cap_tempfile;
use std::io::Read;

#[test]
Expand Down
1 change: 1 addition & 0 deletions rust/src/builtins/scriptlet_intercept/usermod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ pub(crate) fn generate_sysusers_fragment(
#[cfg(test)]
mod test {
use super::*;
use cap_std_ext::cap_tempfile;
use std::io::Read;

#[test]
Expand Down
1 change: 1 addition & 0 deletions rust/src/cliwrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ pub(crate) fn cliwrap_destdir() -> String {
mod tests {
use super::*;
use anyhow::Context;
use cap_std_ext::cap_tempfile;
use std::path::Path;

fn file_contains(
Expand Down
2 changes: 1 addition & 1 deletion rust/src/composepost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ fn hardlink_recurse(
mod tests {
use super::*;
use cap_std::fs::{Dir, DirBuilder};
use cap_std_ext::cap_std;
use cap_std_ext::{cap_std, cap_tempfile};

#[test]
fn stripany() {
Expand Down
1 change: 1 addition & 0 deletions rust/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ mod test {
use super::*;
use crate::capstdext::dirbuilder_from_mode;
use anyhow::Result;
use cap_std_ext::cap_tempfile;

#[test]
fn etcguard() -> Result<()> {
Expand Down
1 change: 1 addition & 0 deletions rust/src/dirdiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ pub(crate) fn diff(src: &Dir, dest: &Dir) -> Result<Diff> {
mod test {
use super::*;
use cap_std::fs::Permissions;
use cap_std_ext::cap_tempfile;
use std::os::unix::fs::PermissionsExt;

#[test]
Expand Down
1 change: 1 addition & 0 deletions rust/src/initramfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ pub(crate) fn initramfs_overlay_generate(
#[cfg(test)]
mod test {
use super::*;
use cap_std_ext::cap_tempfile;

#[test]
fn test_initramfs_overlay() -> Result<()> {
Expand Down
1 change: 1 addition & 0 deletions rust/src/passwd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use cap_std::fs::Dir;
use cap_std::fs::OpenOptions;
use cap_std_ext::cap_std;
use cap_std_ext::cap_std::fs::Permissions;
use cap_std_ext::cap_tempfile;
use cap_std_ext::dirext::CapStdExtDirExt;
use fn_error_context::context;
use gio::prelude::*;
Expand Down
1 change: 1 addition & 0 deletions rust/src/treefile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2919,6 +2919,7 @@ impl TreeComposeConfig {
#[cfg(test)]
pub(crate) mod tests {
use super::*;
use cap_std_ext::cap_tempfile;
use indoc::indoc;
use std::io::Cursor;

Expand Down