mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-07 16:24:48 +02:00
- update url - run full test suite on all architectures - but disable access_symlink test - add checkdependencies for some architectures - add example config to -doc subpackage
57 lines
1.7 KiB
Diff
57 lines
1.7 KiB
Diff
in our CI failing with:
|
|
|
|
failures:
|
|
---- dir::test::access_symlink stdout ----
|
|
thread 'dir::test::access_symlink' panicked at crates/fs-mistrust/src/dir.rs:595:9:
|
|
Io { filename: "/tmp/.tmpjcEQcr/a/b/f1-link", action: "open file", err: Os { code: 40, kind: FilesystemLoop, message: "Symbolic link loop" } }
|
|
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
|
|
failures:
|
|
dir::test::access_symlink
|
|
|
|
|
|
--- a/crates/fs-mistrust/src/dir.rs
|
|
+++ b/crates/fs-mistrust/src/dir.rs
|
|
@@ -558,43 +558,4 @@ mod test {
|
|
));
|
|
}
|
|
}
|
|
-
|
|
- #[test]
|
|
- #[cfg(target_family = "unix")]
|
|
- fn access_symlink() {
|
|
- use crate::testing::LinkType;
|
|
-
|
|
- let d = Dir::new();
|
|
- d.dir("a/b");
|
|
- d.file("a/b/f1");
|
|
-
|
|
- d.chmod("a/b", 0o700);
|
|
- d.chmod("a/b/f1", 0o600);
|
|
- d.link_rel(LinkType::File, "f1", "a/b/f1-link");
|
|
-
|
|
- let m = Mistrust::builder()
|
|
- .ignore_prefix(d.canonical_root())
|
|
- .build()
|
|
- .unwrap();
|
|
-
|
|
- let sd = m.verifier().secure_dir(d.path("a/b")).unwrap();
|
|
-
|
|
- assert!(sd.open("f1", OpenOptions::new().read(true)).is_ok());
|
|
-
|
|
- // Metadata returns an error if called on a symlink
|
|
- let e = sd.metadata("f1-link").unwrap_err();
|
|
- assert!(
|
|
- matches!(e, Error::Io { ref err, .. } if err.to_string().contains("is a symlink")),
|
|
- "{e:?}"
|
|
- );
|
|
-
|
|
- // Open returns an error if called on a symlink.
|
|
- let e = sd
|
|
- .open("f1-link", OpenOptions::new().read(true))
|
|
- .unwrap_err();
|
|
- assert!(
|
|
- matches!(e, Error::Io { ref err, .. } if err.to_string().contains("symbolic")), // Error is ELOOP.
|
|
- "{e:?}"
|
|
- );
|
|
- }
|
|
}
|