[Samba] Samba as a portable userland FS basis?

Tobias Oberstein tobias.oberstein at gmx.de
Tue Jul 20 17:06:31 GMT 2004


>  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 at 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 at 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 at 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 at 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







More information about the samba mailing list