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
1,476 changes: 833 additions & 643 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ edition = "2024"
rust-version = "1.89.0"
license = "MIT"
description = "A Pure Rust SMB Client implementation"
homepage = "https://github.com/afiffon/smb-rs"
repository = "https://github.com/afiffon/smb-rs"
authors = ["Aviv N <avivnaaman04@gmail.com>"]
keywords = ["smb", "network", "file-sharing", "windows"]
Expand Down
1 change: 0 additions & 1 deletion crates/smb-dtyp-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "smb-dtyp-derive"
description = "Derive macros for smb-dtyp, and general smb* crates."
readme = "README.md"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/smb-dtyp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "smb-dtyp"
description = "Common data types for `smb-rs`"
readme = "README.md"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/smb-fscc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "smb-fscc"
description = "FSCC (File System Control Codes) implementations for `smb-rs`"
readme = "README.md"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions crates/smb-fscc/src/info_classes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use binrw::{
/// and to provide the class type from the file information type.
pub trait FileInfoType:
Sized
+ for<'a> BinRead<Args<'static> = (Self::Class,)>
+ BinRead<Args<'static> = (Self::Class,)>
+ ReadEndian
+ for<'a> BinWrite<Args<'static> = ()>
+ BinWrite<Args<'static> = ()>
+ WriteEndian
+ std::fmt::Debug
{
Expand Down
1 change: 0 additions & 1 deletion crates/smb-msg-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "smb-msg-derive"
description = "Derive macros for smb-msg"
readme = "README.md"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/smb-msg/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[package]
name = "smb-msg"
readme = "README.md"
description = "SMB Messages and structures for `smb-rs`"
version.workspace = true
edition.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/smb-rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "smb-rpc"
description = "MS-RPC implementations for `smb-rs`"
readme = "README.md"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand Down
3 changes: 1 addition & 2 deletions crates/smb-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "smb-tests"
description = "Test utilities for smb"
readme = "README.md"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand All @@ -12,5 +11,5 @@ keywords.workspace = true
categories.workspace = true

[dependencies]
binrw = { workspace = true }
hex = "0.4"
pastey = { workspace = true }
10 changes: 5 additions & 5 deletions crates/smb-tests/src/binrw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ macro_rules! test_binrw_write {
(
$type:ty: $value_expr:expr => $byte_arr_or_hex_stream:tt
) => {
pastey::paste! {
$crate::pastey::paste! {
#[test]
fn [<test_ $type:snake _write>]() {
let expr_eval = $value_expr;
Expand All @@ -83,7 +83,7 @@ macro_rules! test_binrw_write {
(
$type:ty => $suffix:ident: $value_expr:expr => $byte_arr_or_hex_stream:tt
) => {
pastey::paste! {
$crate::pastey::paste! {
#[test]
fn [<test_ $type:snake _write $suffix:lower>]() {
let expr_eval = $value_expr;
Expand Down Expand Up @@ -142,7 +142,7 @@ macro_rules! test_binrw_read {
(
$type:ty: $value_expr:expr => $byte_arr_or_hex_stream:tt
) => {
pastey::paste! {
$crate::pastey::paste! {
#[test]
fn [<test_ $type:snake _read>]() {
$crate::binrw_read_and_assert_eq!(
Expand All @@ -157,7 +157,7 @@ macro_rules! test_binrw_read {
(
$type:ty => $suffix:ident: $value_expr:expr => $byte_arr_or_hex_stream:tt
) => {
pastey::paste! {
$crate::pastey::paste! {
#[test]
fn [<test_ $type:snake _read $suffix:lower>]() {
$crate::binrw_read_and_assert_eq!(
Expand Down Expand Up @@ -202,7 +202,7 @@ macro_rules! test_binrw_read_fail {
$type:ty:
$byte_arr_or_hex_stream:tt
) => {
pastey::paste! {
$crate::pastey::paste! {
#[test]
fn [<test_ $type:snake _read_fail>]() {
use ::binrw::{io::Cursor, prelude::*};
Expand Down
3 changes: 3 additions & 0 deletions crates/smb-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
mod binrw;

pub use binrw::*;

#[doc(hidden)]
pub use pastey;
11 changes: 4 additions & 7 deletions crates/smb-transport/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[package]
name = "smb-transport"
description = "SMB Transport implementations for `smb-rs`"
readme = "README.md"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
Expand All @@ -12,7 +11,7 @@ keywords.workspace = true
categories.workspace = true

[dependencies]
smb-dtyp = { workspace = true }
smb-dtyp = { workspace = true, optional = true }
smb-msg = { workspace = true, optional = true }

log = { workspace = true }
Expand All @@ -38,9 +37,7 @@ rustls-platform-verifier = { workspace = true, default-features = false, optiona
# ], optional = true }

binrw = { workspace = true }
modular-bitfield = { workspace = true }
time = { workspace = true }
pastey = { workspace = true }
modular-bitfield = { workspace = true, optional = true }
maybe-async = { workspace = true }
thiserror = { workspace = true }

Expand All @@ -49,9 +46,9 @@ smb-tests = { workspace = true }

[features]
default = ["async", "netbios-transport"]
async = ["tokio", "tokio-util", "futures-core", "futures-util"]
async = ["tokio", "futures-core", "futures-util"]
is_sync = ["maybe-async/is_sync"]

netbios-transport = []
quic = ["dep:quinn", "dep:rustls", "dep:rustls-platform-verifier"]
rdma = ["dep:smb-msg"] # , "dep:async-rdma"]
rdma = ["dep:smb-msg", "dep:smb-dtyp", "dep:tokio-util", "dep:modular-bitfield"] # , "dep:async-rdma"]
20 changes: 10 additions & 10 deletions crates/smb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ url = "2.5.0"
byteorder = { version = "1.5.0", optional = true }

# APIs
sspi = { version = "=0.18.7", features = ["ring"], default-features = false }
sspi = { version = "=0.21.3", features = ["ring"], default-features = false }
reqwest = { workspace = true, optional = true }

# Crypto; RustCrypto provides support for RC versions only.
hmac = "0.13.0-rc.2"
sha2 = "0.11.0-rc.2"
kbkdf = { version = "0.1.0-pre.0" }
crypto-common = { version = "0.2.0-rc.4" }
aes = "0.9.0-rc.1"
aes-gcm = { version = "0.11.0-rc.1", optional = true }
cmac = { version = "0.8.0-rc.1", optional = true }
ccm = { version = "0.6.0-pre.0", optional = true }
aead = { version = "0.6.0-rc.2", optional = true }
hmac = "^0.13"
sha2 = "^0.11"
kbkdf = { version = "0.1.0-rc.1" }
crypto-common = { version = "0.2.1" }
aes = "^0.9"
aes-gcm = { version = "^0.11", optional = true }
cmac = { version = "^0.8", optional = true }
ccm = { version = "^0.6", optional = true }
aead = { version = "^0.6", optional = true }

# Compression
lz4_flex = { version = "0.11", default-features = false, features = [
Expand Down
2 changes: 1 addition & 1 deletion crates/smb/src/compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl CompressionMethod for ChainedCompression {
if len_after > compressed.original_size as usize {
return Err(CompressionError::ChainedCompressionFailed(
"Decompressed size exceeds the expected size".to_string(),
))?;
));
}
if let Some(original_size) = item.original_size
&& len_after - len_before != original_size as usize
Expand Down
Loading
Loading