Comment 9 for bug 2065579

Revision history for this message
Frank Heimes (fheimes) wrote :

Please let me jump in (for TZ reasons).

The patch "debian/patches/ubuntu/lp-2065579-9pfs-allow-sockets.patch" (as always referenced in debin/changelog) that Sergio created and that is incl. in the PPA build is this:

From: Sergio Durigan Junior <email address hidden>
Date: Thu, 30 May 2024 16:45:56 -0400
Subject: hw/9pfs/9p-util.h: Also allow sockets to be opened

Forwarded: not-needed
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2065579
---
 hw/9pfs/9p-util.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/9pfs/9p-util.h b/hw/9pfs/9p-util.h
index ff32179..a3df012 100644
--- a/hw/9pfs/9p-util.h
+++ b/hw/9pfs/9p-util.h
@@ -47,7 +47,8 @@ static inline int close_if_special_file(int fd)
         close_preserve_errno(fd);
         return -1;
     }
- if (!S_ISREG(stbuf.st_mode) && !S_ISDIR(stbuf.st_mode)) {
+ if (!S_ISREG(stbuf.st_mode) && !S_ISDIR(stbuf.st_mode)
+ && !S_ISSOCK(stbuf.st_mode)) {
         error_report_once(
             "9p: broken or compromised client detected; attempt to open "
             "special file (i.e. neither regular file, nor directory)"