[Samba] unix fifo inaccessible via samba share
TAKAHASHI Motonobu
monyo at monyo.com
Wed Jul 20 08:02:22 MDT 2011
From: Jeremy Allison <jra at samba.org>
Date: Tue, 19 Jul 2011 18:02:54 -0700
> On Tue, Jul 19, 2011 at 04:37:58PM -0500, Charles Redditt wrote:
> > Issue: unix fifo (named pipe) does not appear in share, attempts to read
> > the pipe result in "Access Denied"
(snip)
> Yeah, this should work (it used to). Can you try with
> 3.5.9 (latest version) and if it doesn't log a bug please ?
I try with 3.5.9 and it works fine.
I'm surprising Samba supports fifo!
1) Compile this program available from http://www.ncad.co.jp/~komata/c-kouza12.htm
-----
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/errno.h>
#include <sys/fcntl.h>
void main()
{
int fd;
char buf[256];
if(mkfifo("FifoTest",0666)==-1){
perror("mkfifo");
}
if((fd=open("FifoTest",O_WRONLY))==-1){
perror("open");
exit(-1);
}
while(1){
fgets(buf,sizeof(buf)-1,stdin);
if(feof(stdin)){
break;
}
write(fd,buf,strlen(buf));
}
close(fd);
}
-----
2) echo testtest | ./a.out
3) mount from Windows XP with "net use"
4) type FifoTest and works fine.
---
TAKAHASHI Motonobu <monyo at samba.gr.jp>
More information about the samba
mailing list