summary refs log tree commit diff stats
path: root/gitlab/issues/target_missing/host_missing/accel_HVF/1299.toml
blob: ddb9659e95c5fe674877037234bd451bb6a50e2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
id = 1299
title = "User networking with an SMB Share while not running as root"
state = "opened"
created_at = "2022-11-04T07:52:58.161Z"
closed_at = "n/a"
labels = ["Networking", "accel: HVF", "hostos: macOS"]
url = "https://gitlab.com/qemu-project/qemu/-/issues/1299"
host-os = "MacOS 12.6"
host-arch = "x86 (or ARM)"
qemu-version = "7.1.0"
guest-os = "Any Linux distro with CIFS, or with `smbclient"
guest-arch = "-"
description = """When attempting to write a file to the qemu share, Samba always responds with NT_STATUS_ACCESS_DENIED.

This only happens on the MacOS version of Samba, on Linux it appears to work without issues for now."""
reproduce = """1. Start a VM with a SMB share attached to it
2. Create a test file to upload `touch test-file.txt`
3. Upload the test file `smbclient //10.0.2.4/qemu -c 'put test-file.txt'"""
additional = """QEMU has been using Samba for it's SMB shares for quite some time now.
But in the 4.17.x release a bug has appeared in the MacOS Build of Samba.

I've filed a bug with Samba, and suggested a fix for it.
https://bugzilla.samba.org/show_bug.cgi?id=15215

The origin of the bug lies in the fact that when running SMBD as a non-root user, a function sets `errno` unexpectedly.
But after discussing this with Samba, they concluded that running smbd as an un-privileged user is not a supported use case.

Whilst this is not a QEMU bug per se, it is caused by the fact that QEMU is running smbd in an unsupported manner.

As a side note, on Linux this bug does not appear to exist as of yet.
The Linux version of `unbecome_root` doesn't seem to set `errno`. (tested on a recent ArchLinux install).
But I think this depends on the LibC implementation of setuid/seteuid/setreuid/etc. so I can't say it won't happen in the future, or with a different LibC implementation."""