Skip to content
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
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,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 @@ -41,7 +41,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
4 changes: 2 additions & 2 deletions cap-async-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ edition = "2021"
arf-strings = { version = "0.7.0", optional = true }
async-std = { version = "1.13.0", features = ["attributes", "io_safety"] }
cap-primitives = { path = "../cap-primitives", version = "^3.4.5" }
io-lifetimes = { version = "2.0.0", default-features = false, features = ["async-std"] }
io-extras = { version = "0.18.3", features = ["use_async_std"] }
io-lifetimes = { version = "3.0.1", default-features = false, features = ["async-std"] }
io-extras = { version = "0.19.0", features = ["use_async_std"] }
camino = { version = "1.0.5", optional = true }

[target.'cfg(not(windows))'.dependencies]
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 @@ -17,7 +17,7 @@ arf-strings = { version = "0.7.0", optional = true }
cap-async-std = { path = "../cap-async-std", optional = true, version = "3.4.5" }
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 }
async-std = { version = "1.13.0", features = ["io_safety", "attributes"], optional = true }
async-trait = { version = "0.1.42", optional = true }
camino = { version = "1.0.5", optional = true }
Expand All @@ -32,7 +32,7 @@ async_std_fs_utf8 = ["cap-async-std/fs_utf8", "camino"]
async_std_arf_strings = ["cap-async-std/arf_strings", "async_std_fs_utf8", "arf-strings"]

[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