Skip to content
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

fix(core): fix check temp path permission on mac os, fix #6256 #9588

Open
wants to merge 4 commits into
base: 1.x
Choose a base branch
from

Conversation

0x-jerry
Copy link

close #6256

@0x-jerry 0x-jerry requested a review from a team as a code owner April 27, 2024 02:52
@0x-jerry 0x-jerry marked this pull request as draft April 27, 2024 02:52
@0x-jerry 0x-jerry marked this pull request as ready for review April 27, 2024 03:37
@FabianLars FabianLars requested a review from a team April 27, 2024 08:04
@tweidinger
Copy link
Contributor

tweidinger commented Apr 30, 2024

Will check this PR in the upcoming days but am wondering if https://github.com/tauri-apps/tauri/pull/9072/files#diff-903ee43f2eb846686e5baf219fc515ff00de27369cef1e81b37164de847d2e90 does fix the underlying issue, as it resolves symlinks now before checking. This is in dev, so not sure if it can/is/will be back ported and if other changes influence behavior.

@0x-jerry
Copy link
Author

0x-jerry commented Apr 30, 2024

@tweidinger I tested how path::is_symlink works, and seems it only checks the exact symbolic path, eg.

use std::{
    env,
    path::PathBuf,
};

fn main() {
    let p_var = PathBuf::from("/var");

    println!("{:?}", p_var.is_symlink()); // => true

    let p_var = env::temp_dir();

    println!("{:?}", p_var.is_symlink()); // => false
}
image

This means any subpath of a symbolic folder will return false, so https://github.com/tauri-apps/tauri/pull/9072/files#diff-903ee43f2eb846686e5baf219fc515ff00de27369cef1e81b37164de847d2e90 may not be able to fix subpath permission check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants