Recently, I looked at some options implementing unusual file systems in userland. On Linux, there is LUFS and similar stuff which frees one from touching any kernel code. The design is always similar: a generic kernel module forwards calls to a user level daemon and forwards returned results back. The user level daemon implements or serves as a basis for unusual user land filesystem implmentation. However, LUFS is not available on Windows and I'm not aware of somehting similar .. So I've looked after an alternative for LUFS portable across at least over Windows and Linux and probably POSIX, *BSD and MacOSX. I did not found anything .. my conclusion was, that one has to go e.g. and use the "MS Installable File Systems Development Kit" and build a kernel mode driver which forwards calls to a user mode daemon (pretty much the LUFS design). I'm unwilling to take that level of pain. Next idea was to use the Samba _server_ code as a basis to built the unusual FS on top and just run the Samba server colocated/locally on the desktop machine. Great reuse. Here are the two main questions: 1. Is it possible to build/run the Samba _server_ on Windows (e.g. using Cygwin)? 2. Is there a "reasonable" internal API within the Samba server which could be used to stack unusual FS stuff on top? Generally, IMHO it would be great to have an open standard C API to some portable user land daemon to implement portable user land file systems. Cheers, Tobias
> 1. Is it possible to build/run the Samba _server_ on Windows > (e.g. using Cygwin)?a quick ./configure test on Cygwin results in: ... checking whether to use included popt... ./popt checking configure summary... ERROR: No locking available. Running Samba would be unsafe configure: error: summary failure. Aborting config tob@blackbox ~/samba-2.2.9/source after hacking/forcing configure to go on by inserting samba_cv_HAVE_FCNTL_LOCK=yes the "configure" runs till' end with no further complaints. moreover: "make" runs through without complaints (some C warnings which look like expected ..). then "make install" has it's problems: tob@blackbox ~/samba-2.2.9/source $ make install Using FLAGS = -O -I./popt -Iinclude -I./include -I./ubiqx -I./smbwrapper -DLOGFILEBASE="/usr DSBINDIR="/usr/local/samba/bin" -DLOCKDIR="/usr/local/samba/var/locks" -DCODEPAGEDIR="/usr/loca IBDIR="/usr/local/samba/lib" -DHAVE_INCLUDES_H -DPASSWD_PROGRAM="/usr/bin/passwd" -DSMB_PASSWD_ Using FLAGS32 = -O -I./popt -Iinclude -I./include -I./ubiqx -I./smbwrapper -DLOGFILEBASE="/u -DSBINDIR="/usr/local/samba/bin" -DLOCKDIR="/usr/local/samba/var/locks" -DCODEPAGEDIR="/usr/lo DLIBDIR="/usr/local/samba/lib" -DHAVE_INCLUDES_H -DPASSWD_PROGRAM="/usr/bin/passwd" -DSMB_PASSW Using LIBS = -lcrypt /bin/sh ./install-sh -d -m 0755 /usr/local/samba /bin/sh ./install-sh -d -m 0755 /usr/local/samba/bin /bin/sh ./install-sh -d -m 0755 /usr/local/samba/bin /bin/sh ./install-sh -d -m 0755 /usr/local/samba/lib /bin/sh ./install-sh -d -m 0755 /usr/local/samba/var /bin/sh ./install-sh -d -m 0755 /usr/local/samba/var/locks /bin/sh ./install-sh -d -m 0755 /usr/local/samba/lib/codepages Installing bin/smbd as /usr/local/samba/bin/smbd cp: `bin/smbd' and `/usr/local/samba/bin/smbd' are the same file chmod: getting attributes of `/usr/local/samba/bin/smbd': No such file or directory Installing bin/nmbd as /usr/local/samba/bin/nmbd cp: `bin/nmbd' and `/usr/local/samba/bin/nmbd' are the same file chmod: getting attributes of `/usr/local/samba/bin/nmbd': No such file or directory Installing bin/swat as /usr/local/samba/bin/swat cp: `bin/swat' and `/usr/local/samba/bin/swat' are the same file chmod: getting attributes of `/usr/local/samba/bin/swat': No such file or directory ... after manually copying the binaries like "make install" tried, I reran "make install" to get the codepages installed, since now it can find the binaries needed for this then, I copied C:\cygwin\home\tob\samba-2.2.9\examples\smb.conf.default to C:\cygwin\usr\local\samba\lib\smb.conf with slight editing now, at least basic functionality seem to work: tob@blackbox ~ $ smbd -i -d 10 -s /usr/local/samba/lib/smb.conf ... load_unicode_map: loading unicode map for codepage 850. load_unix_unicode_map: ISO8859-1 (init_done=0, override load_unicode_map: loading unicode map for codepage ISO8 loaded services fcntl_lock 5 8 0 1 2 fcntl_lock: Lock call successful claiming 0 bind succeeded on port 139 ... waiting for a connection and $ smbclient -L localhost added interface ip=192.168.1.101 bcast=192.168.1.255 nmask=255.255.255.0 Password: Anonymous login successful Domain=[ARBEITSGRUPPE] OS=[Unix] Server=[Samba 2.2.9] Sharename Type Comment --------- ---- ------- tmp Disk Temporary file space IPC$ IPC IPC Service (Samba Server) ADMIN$ Disk IPC Service (Samba Server) Server Comment --------- ------- Workgroup Master --------- ------- tob@blackbox ~ so this leaves me with the question: Is the fcnlt/locking issue on Cygwin significant?> > 2. Is there a "reasonable" internal API within the Samba server > which could be used to stack unusual FS stuff on top?I just learned there is a VFS interface to implement modules to do various unusual things. Is this the recommended way of extending Samba? Cheers, Tobias