]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
cifs: Fix support for creating SFU fifo
authorPali Rohár <pali@kernel.org>
Tue, 7 Jul 2026 09:03:56 +0000 (11:03 +0200)
committerSteve French <stfrench@microsoft.com>
Wed, 8 Jul 2026 23:44:36 +0000 (18:44 -0500)
SFU fifos are natively supported (created and recognized) at least by:
- Microsoft POSIX subsystem
- OpenNT/Interix subsystem
- Microsoft SFU (Windows Services for UNIX)
- Microsoft SUA (Subsystem for UNIX-based Applications)
- Windows NFS server (up to the Windows Server 2008 R2)

Windows NFS server since Windows Server 2012 uses new reparse point format
for storing new fifos, but still can recognize this old format (also in the
latest Windows Server 2022 version).

SFU-style fifo is empty regular file which has system attribute set.

These SFU-style fifos are already recognized by Linux SMB client.

But Linux SMB client is currently creating new SFU fifos in different
format which is not compatible with all those SFU-style consumers. Fix this
by creating new fifos in correct SFU format which would be recognized by
all those applications and also by existing Linux SMB clients.

This change affects only creating new fifos when mount option -o sfu is used.

Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2ops.c

index b4fa43f32e5159e2e0fad2dde76010e153fc6f5e..15b3ae45c833784cc70de6de6559a165683a9904 100644 (file)
@@ -5291,10 +5291,8 @@ int __cifs_sfu_make_node(unsigned int xid, struct inode *inode,
                type[0] = '\0';
                break;
        case S_IFIFO:
-               type_len = 8;
-               strscpy(type, "LnxFIFO");
-               data = (u8 *)&pdev;
-               data_len = sizeof(pdev);
+               /* SFU fifo is system file which is empty */
+               type_len = 0;
                break;
        default:
                rc = -EPERM;