-
Notifications
You must be signed in to change notification settings - Fork 12
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
Impl win permissions #2132
base: develop
Are you sure you want to change the base?
Impl win permissions #2132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion
nym-vpn-core/crates/nym-vpn-account-controller/src/storage/credentials/pending_credential_requests/mod.rs
line 289 at r1 (raw file):
// Set file permissions unsafe { if SetFileSecurityA(
Maybe we should use wide char version SetFileSecurityW
and not ANSI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @coddie83)
nym-vpn-core/crates/nym-vpn-account-controller/src/storage/credentials/pending_credential_requests/mod.rs
line 227 at r1 (raw file):
// FIXME: "SYSTEM" need to be changed to the required account(here and below) unsafe { LookupAccountNameA(
Let's use widechar version LookupAccountNameW
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 4 unresolved discussions (waiting on @coddie83)
nym-vpn-core/crates/nym-vpn-account-controller/src/storage/credentials/pending_credential_requests/mod.rs
line 210 at r1 (raw file):
let file_path = path.as_ref(); let c_file_path = CString::new(file_path.to_str().unwrap()).map_err(|_| std::io::Error::from(std::io::ErrorKind::InvalidInput))?;
Maybe we can leverage widestring
crate to do this heavy lifting for us.
nym-vpn-core/crates/nym-vpn-account-controller/src/storage/credentials/pending_credential_requests/mod.rs
line 298 at r1 (raw file):
} tracing::info!("Successfully set file permissions for {:?}", file_path);
You can use normal formatting with {}
instead of debug formatting {:?}
by calling it viafile_path.display()
b7036f5
to
f69c63a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r2, all commit messages.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @coddie83)
nym-vpn-core/crates/nym-vpn-account-controller/Cargo.toml
line 44 at r2 (raw file):
uuid.workspace = true zeroize.workspace = true windows = "0.59.0"
You don't need windows
here as you solely use windows-sys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 2 files reviewed, 3 unresolved discussions (waiting on @coddie83)
nym-vpn-core/crates/nym-vpn-account-controller/Cargo.toml
line 46 at r2 (raw file):
windows = "0.59.0" windows-sys = { version = "0.59.0", features = ["Win32_System_Threading", "Win32_System_SystemServices"] } widestring = "1.0"
We keep all dependency versions in the workspace to make it easier to update them. widestring
is a part of workspace so you can simply replace the version with workspace = true
. Same goes for windows-sys, i.e:
widestring.workspace = true
windows-sys = { workspace = true, features = ["Win32_System_Threading", "Win32_System_SystemServices"] }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @coddie83)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @coddie83)
fabe4fd
to
82a2e96
Compare
82a2e96
to
e1b5f16
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @coddie83)
nym-vpn-core/crates/nym-vpn-account-controller/Cargo.toml
line 45 at r4 (raw file):
uuid.workspace = true zeroize.workspace = true windows-sys = { version = "0.59.0", features = ["Win32_System_Threading", "Win32_System_SystemServices"] }
windows-sys should use the version from workspace. Please change version = ...
with workspace = true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r4.
Reviewable status: all files reviewed (commit messages unreviewed), 2 unresolved discussions (waiting on @coddie83)
5c41c6e
to
7dc4c68
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r5, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @coddie83)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Windows CI has some minor issue.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @coddie83)
This reverts commit 7dc4c68.
ed3ce4e
to
b7c207e
Compare
This reverts commit b7c207e.
…ent into impl_win_permissions
d888975
to
2c4240c
Compare
2c4240c
to
f070a75
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 7 files at r6.
Reviewable status: 3 of 7 files reviewed, 2 unresolved discussions (waiting on @rokas-ambrazevicius)
nym-vpn-core/crates/nym-vpn-account-controller/Cargo.toml
line 47 at r6 (raw file):
windows-sys = { workspace = true, features = ["Win32_System_Threading", "Win32_System_SystemServices"] } widestring.workspace = true winapi = { version = "0.3" }
Can we please use it from workspace too? All versions we have are defined in workspace Cargo.toml
in the root.
nym-vpn-core/crates/nym-vpn-store/Cargo.toml
line 26 at r6 (raw file):
windows-sys = { workspace = true, features = ["Win32_System_Threading", "Win32_System_SystemServices"] } widestring.workspace = true winapi = { version = "0.3" }
Please use version from workspace. It was moved there recently I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 7 files at r6.
Reviewable status: all files reviewed (commit messages unreviewed), 2 unresolved discussions (waiting on @coddie83 and @rokas-ambrazevicius)
VPN-2214:file permissions on windows implementation
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)