[Samba] linux named pipe over samba

Danny Sauer samba at dannyteleologic.net
Tue Dec 30 22:10:42 GMT 2003


I have a named pipe on samba being used as a random signature file.
For some reason, the user can't get a .sig from that pipe when he
connects from a Win 2K box.  The writer end of the .sig file is a
real basic random sig generator in perl (this is kinda simplified):

 #!/usr/bin/perl -w
 $SIG{PIPE} = 'IGNORE';
 while(1){
	open(PIPE, '>', '/path/to/named_pipe');
	print PIPE get_one_sig_line();
	close PIPE;
	sleep(1);
 }
 sub get_one_sig_line{
	return "this is a bad .sig\n";
 }

and /path/to/named/pipe is, in fact, a named pipe.  If the while loop
is removed, the program exits when the file's selected under windows.
That leads me to believe that windows is trying to read the file or
get the file size or something before it reads from it.  Therefore, I
assume that something's getting hung up on the Linux side's buffer for
the pipe, or similar.

We tried turning off locking, thinking that there was some client-side
caching we could avoid - this went into smb.conf:

 [sharename]
 locking = False
 oplocks = False
 level2 oplocks = False

but that didn't appear to help.

Any ideas what's wrong?  Can this be done, or am I just wasting time?

Thanks.
--Danny


More information about the samba mailing list