server: Allow creating named pipes using \Device\NamedPipe\ as RootDirectory. (#52105)
On Windows, \Device\NamedPipe\ is the root directory of the named pipe file system (NPFS), and can be used as RootDirectory to skip its path when accessing the NPFS namespace.
Note: subpath->str
may look hacky, but it's used to indicate trailing \\
1 and existing code already does it too:
-
server/directory.c
checksname->str
2 to test if this is the last component. This is evident by the fact that changing it toname->len
will lead to major regression. -
server/registry.c
has similar lookup logic.34
-
https://gitlab.winehq.org/wine/wine/-/blob/c64aa0006e4a33d755a57a693cd81dc1ed95fa9d/server/directory.c#L214
↩ -
https://gitlab.winehq.org/wine/wine/-/blob/c64aa0006e4a33d755a57a693cd81dc1ed95fa9d/server/directory.c#L220
↩ -
https://gitlab.winehq.org/wine/wine/-/blob/c64aa0006e4a33d755a57a693cd81dc1ed95fa9d/server/registry.c#L521
↩ -
https://gitlab.winehq.org/wine/wine/-/blob/c64aa0006e4a33d755a57a693cd81dc1ed95fa9d/server/registry.c#L531
↩
Edited by Jinoh Kang