Custom named pipes

Gerry Jacobs gerryjacobs at
Mon Sep 23 06:25:01 GMT 2002

In case someone else is interested in the hacks: I attached a gzipped patch
with all the changes since 2.2.5.
The configuration of a named pipe is done in the smb.conf file like this:

share type = IPC
path = /var/tmp

The 'share type = IPC' parameter tells smbd that this share is a named pipe.
The 'path' locates where the local unix pipe should be created.
In case path is not defined, path will be '/tmp'.
There are some incompatibilities:
1) There's no full-duplex support:
   The server part can only write data and the client part can only 
   receive data.
   In case you want to write data to both sides, you'll need 2 pipes.
   Two chat programs are added in the examples/libsmbclient directory.
   One is intended for a windows platform, the other for linux.
   Both can receive and send data from/to each other.
2) In case the unix program stops reading its local unix queue,
   the named pipe connection will still remain.
   The windows program will only receive the "broken pipe" error when
   it writes something in the pipe.
3) In case the windows server program breaks the connection, the unix client
   program won't see a thing because it's reading a local (unix) named pipe
   which is filled by smbd.
4) Somehow, I'm unable to open a named pipe on the same pc (samba<->samba).
   I haven't tested it yet with another remote samba server.

have fun,

Gerry Jacobs

-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba-2.2.5-named-pipes.patch.gz
Type: application/x-gzip-compressed
Size: 9038 bytes
Desc: not available
Url :

More information about the samba-technical mailing list