http://bugs.winehq.org/show_bug.cgi?id=59671 Bug ID: 59671 Summary: Inconsistent FILE_ATTRIBUTE_REPARSE_POINT on container bind-mounts Product: Wine Version: 11.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@list.winehq.org Reporter: me@a2va.dev Distribution: --- Created attachment 80762 --> http://bugs.winehq.org/attachment.cgi?id=80762 Rust executable When running Wine inside a container where the working directory is a Linux mount point (bind-mounted), Wine identifies the directory as a symlink/reparse point, but fails to satisfy a DeviceIoControl request for FSCTL_GET_REPARSE_POINT. This causes Rust's std::fs::read_link to fail with ERROR_NOT_A_REPARSE_POINT (4390). ``` use std::env; use std::path::PathBuf; fn main() { let target = env::args().nth(1).unwrap_or_else(|| ".".to_string()); let path = PathBuf::from(&target); if path.is_symlink() { println!("Is symlink: {}", path.display()); path.read_link().unwrap(); } } ``` Output of the program: ``` Z:\home\a2va\Documents\temp\wine-readlink>wine-readlink.exe Is symlink: . thread 'main' (104) panicked at src\main.rs:10:26: called `Result::unwrap()` on an `Err` value: Os { code: 4390, kind: Uncategorized, message: "OS Error 4390 (FormatMess ageW() returned error 317)" } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` Here is the Dockerfile, with the command to reproduce for both podman and docker. ```FROM fedora:43 RUN dnf install -y \ wine \ wine-core \ wine-common ENV WINEPREFIX=/opt/wineprefix RUN mkdir -p "$WINEPREFIX" RUN wineboot --init RUN wineserver -w # ENV WINEDEBUG=+relay,+file,+ioctl CMD ["wine", "cmd"] # podman build -f Dockerfile -t wine-repro:latest # podman run -it -w "$(pwd)" -v "$(pwd):$(pwd):rbind,z" wine-repro:latest # podman run -it -w "$(pwd)" -v "$(pwd):$(pwd):rbind,z" wine-repro:latest wine read-link.exe > wine.log 2>&1 # docker build -f Dockerfile -t wine-repro:latest . # docker run -it -w "$(pwd)" -v "$(pwd):$(pwd)" wine-repro:latest # docker run -it -w "$(pwd)" -v "$(pwd):$(pwd)" wine-repro:latest wine read-link.exe > wine.log 2>&1 ``` It's also reproducible in C, with CreateFile and DeviceIoControl. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.