Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ jobs:
include:
- build: msrv
os: ubuntu-latest
rust: 1.63
rust: "1.70"

steps:
- uses: actions/checkout@v4
Expand All @@ -372,7 +372,7 @@ jobs:
with:
toolchain: ${{ matrix.rust }}

- name: Use specific dependency versions for Rust 1.63 compatibility.
- name: Use specific dependency versions for Rust 1.70 compatibility.
run: |
cargo update --package=once_cell --precise=1.20.3

Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ edition = "2021"
publish = false
exclude = ["/.*"]
# This is also checked in CI.
rust-version = "1.63"
rust-version = "1.70"

[dev-dependencies]
anyhow = "1.0.37"
Expand All @@ -28,7 +28,7 @@ rand = "0.8.1"
tempfile = "3.1.0"
camino = "1.0.5"
libc = "0.2.100"
io-lifetimes = "2.0.0"
io-lifetimes = "3.0.1"

[target.'cfg(not(windows))'.dev-dependencies]
rustix = { version = "1.0.0", features = ["fs"] }
Expand All @@ -39,7 +39,7 @@ rustix = { version = "1.0.0", features = ["fs"] }
nt_version = "0.1.3"

[target.'cfg(windows)'.dependencies.windows-sys]
version = ">=0.52, <=0.59"
version = ">=0.60, <0.62"
features = [
"Win32_Storage_FileSystem",
"Win32_Foundation",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ the process filesystem namespace.

## Minimum Supported Rust Version (MSRV)

This crate currently works on Rust 1.63, when default features are enabled.
This crate currently works on Rust 1.70, when default features are enabled.
Some of the optional features have stricter requirements.

[`arf-strings`]: https://github.com/bytecodealliance/arf-strings/
Expand Down
2 changes: 1 addition & 1 deletion cap-directories/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ directories-next = "2.0.0"
rustix = { version = "1.0.0" }

[target.'cfg(windows)'.dependencies.windows-sys]
version = ">=0.52, <=0.59"
version = ">=0.60, <0.62"
features = [
"Win32_Foundation",
]
4 changes: 2 additions & 2 deletions cap-fs-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ edition = "2021"
arf-strings = { version = "0.7.0", optional = true }
cap-std = { path = "../cap-std", optional = true, version = "3.4.5" }
cap-primitives = { path = "../cap-primitives", version = "3.4.5" }
io-lifetimes = { version = "2.0.0", default-features = false }
io-lifetimes = { version = "3.0.1", default-features = false }
camino = { version = "1.0.5", optional = true }

[features]
Expand All @@ -26,7 +26,7 @@ arf_strings = ["cap-std/arf_strings", "fs_utf8", "arf-strings"]
std = ["cap-std"]

[target.'cfg(windows)'.dependencies.windows-sys]
version = ">=0.52, <=0.59"
version = ">=0.60, <0.62"
features = [
"Win32_Storage_FileSystem",
]
Expand Down
6 changes: 3 additions & 3 deletions cap-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ arbitrary = { version = "1.0.0", optional = true, features = ["derive"] }
ipnet = "2.5.0"
maybe-owned = "0.3.4"
fs-set-times = "0.20.0"
io-extras = "0.18.3"
io-lifetimes = { version = "2.0.0", default-features = false }
io-extras = "0.19.0"
io-lifetimes = { version = "3.0.1", default-features = false }

[dev-dependencies]
cap-tempfile = { path = "../cap-tempfile" }
Expand All @@ -34,7 +34,7 @@ rustix-linux-procfs = "0.1.1"
winx = "0.36.0"

[target.'cfg(windows)'.dependencies.windows-sys]
version = ">=0.52, <=0.59"
version = ">=0.60, <0.62"
features = [
"Win32_Foundation",
"Win32_Security",
Expand Down
12 changes: 7 additions & 5 deletions cap-primitives/src/windows/fs/create_file_at_w.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ use windows_sys::Win32::Foundation::{
GENERIC_WRITE, HANDLE, INVALID_HANDLE_VALUE, STATUS_OBJECT_NAME_COLLISION, STATUS_PENDING,
STATUS_SUCCESS, SUCCESS, UNICODE_STRING,
};
use windows_sys::Win32::Foundation::{OBJ_CASE_INSENSITIVE, OBJ_INHERIT};
use windows_sys::Win32::Security::{
SECURITY_ATTRIBUTES, SECURITY_DYNAMIC_TRACKING, SECURITY_QUALITY_OF_SERVICE,
SECURITY_STATIC_TRACKING,
SECURITY_ATTRIBUTES, SECURITY_DESCRIPTOR, SECURITY_DYNAMIC_TRACKING,
SECURITY_QUALITY_OF_SERVICE, SECURITY_STATIC_TRACKING,
};
use windows_sys::Win32::Storage::FileSystem::{
CREATE_ALWAYS, CREATE_NEW, DELETE, FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_COMPRESSED,
Expand All @@ -36,7 +37,6 @@ use windows_sys::Win32::Storage::FileSystem::{
OPEN_ALWAYS, OPEN_EXISTING, SECURITY_CONTEXT_TRACKING, SECURITY_EFFECTIVE_ONLY,
SECURITY_SQOS_PRESENT, SYNCHRONIZE, TRUNCATE_EXISTING,
};
use windows_sys::Win32::System::Kernel::{OBJ_CASE_INSENSITIVE, OBJ_INHERIT};
use windows_sys::Win32::System::WindowsProgramming::{
FILE_OPENED, FILE_OPEN_NO_RECALL, FILE_OPEN_REMOTE_INSTANCE, FILE_OVERWRITTEN,
};
Expand Down Expand Up @@ -159,7 +159,9 @@ pub unsafe fn CreateFileAtW(
objectattributes.ObjectName = &mut unicode_string;
objectattributes.Attributes = attributes;
if !lpsecurityattributes.is_null() {
objectattributes.SecurityDescriptor = (*lpsecurityattributes).lpSecurityDescriptor;
objectattributes.SecurityDescriptor = (*lpsecurityattributes)
.lpSecurityDescriptor
.cast::<SECURITY_DESCRIPTOR>();
}

// If needed, set `objectattributes`' `SecurityQualityOfService` field.
Expand All @@ -172,7 +174,7 @@ pub unsafe fn CreateFileAtW(
SECURITY_DYNAMIC_TRACKING
} else {
SECURITY_STATIC_TRACKING
};
} as u8;
qos.EffectiveOnly = ((dwflagsandattributes & SECURITY_EFFECTIVE_ONLY) != 0) as _;

objectattributes.SecurityQualityOfService =
Expand Down
4 changes: 2 additions & 2 deletions cap-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ rustdoc-args = ["--cfg=docsrs"]
[dependencies]
arf-strings = { version = "0.7.0", optional = true }
cap-primitives = { path = "../cap-primitives", version = "^3.4.5" }
io-extras = "0.18.3"
io-lifetimes = { version = "2.0.0", default-features = false }
io-extras = "0.19.0"
io-lifetimes = { version = "3.0.1", default-features = false }
camino = { version = "1.0.5", optional = true }

[target.'cfg(not(windows))'.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion cap-tempfile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rustix = { version = "1.0.0" }
rustix-linux-procfs = "0.1.1"

[target.'cfg(windows)'.dev-dependencies.windows-sys]
version = ">=0.52, <=0.59"
version = ">=0.60, <0.62"
features = [
"Win32_Foundation",
]
Expand Down
2 changes: 1 addition & 1 deletion fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cap-primitives = { path = "../cap-primitives", features = ["arbitrary"] }
# Depend on io-lifetimes with default features, as the fuzzing framework
# seems to add a dependency on `io_lifetimes::OwnedFd::drop` even when the
# code itself doesn't have one.
io-lifetimes = "2.0.0"
io-lifetimes = "3.0.1"

[[bin]]
name = "cap-primitives"
Expand Down
4 changes: 1 addition & 3 deletions tests/sys_common/symlink_junction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ pub struct REPARSE_MOUNTPOINT_DATA_BUFFER {

#[cfg(windows)]
#[allow(dead_code)]
pub fn cvt(
i: windows_sys::Win32::Foundation::BOOL,
) -> io::Result<windows_sys::Win32::Foundation::BOOL> {
pub fn cvt(i: windows_sys::core::BOOL) -> io::Result<windows_sys::core::BOOL> {
if i == 0 {
Err(io::Error::last_os_error())
} else {
Expand Down
Loading