Fwd: VFS error

Sharayu Mantri sm25541994 at gmail.com
Mon Feb 23 08:58:00 MST 2015


---------- Forwarded message ----------
From: Volker Lendecke <Volker.Lendecke at sernet.de>
Date: Mon, Feb 23, 2015 at 3:31 PM
Subject: Re: VFS error
To: Sharayu Mantri <sm25541994 at gmail.com>
Cc: samba-technical <samba-technical at lists.samba.org>


On Mon, Feb 23, 2015 at 07:06:00AM -0800, Richard Sharpe wrote:
> On Mon, Feb 23, 2015 at 5:35 AM, Sharayu Mantri <sm25541994 at gmail.com>
wrote:
> > ---------- Forwarded message ----------
> > From: Sharayu Mantri <sm25541994 at gmail.com>
> > Date: Mon, Feb 23, 2015 at 12:26 PM
> > Subject: Re: VFS error
> > To: Volker.Lendecke at sernet.de
> >
> >
> > Sorry, But i didn't get how to compile it with version 28. Can u help me
> > with the steps ? Some of the steps. if vfs_demo.c is my demo code .
> > Sorry for any inconvenience.
> > Thank you
>
> How did you install Samba on your system? Was it with RPMs or DEBs?
>
> What he is saying is that the version of smbd on your system is
> different (earlier) than the version you compiled the module with, and
> that breaks things badly.
>
> Tell us the version of Samba you are running. You can do smbd -V or
> smbd -b to get the correct info.

If you are running the system-delivered smbd from the
repositories that your Unix provides, you should acquire the
relevant source code and recompile your module within the
environment your original Unix smbd gives you. The specifics
of how to get this environment up and running very much
depends on the details of which Unix you are running.

With best regards,

Volker Lendecke

--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

Following are the steps i followed:

1. Get latest samba source
wget http://ftp.samba.org/pub/samba/samba-4.1.14.tar.gz

tar xvf samba-4.1.14.tar.gz

apt-get install python-dev

//if any other error install below lib
/*apt-get install build-essential libacl1-dev libattr1-dev libblkid-dev
libgnutls-dev libreadline-dev python-dev python-dnspython gdb pkg-config
libpopt-dev libldap2-dev
dnsutils libbsd-dev attr krb5-user docbook-xsl libcups2-dev acl bind9
libncurses5-dev */


2. Configure with debug option and developer option

   ./configure --enable-debug --enable-developer

but got error


Build failed: ABI for libtevent.so has changed - please fix library
version then build with --abi-update
See http://wiki.samba.org/index.php/Waf#ABI_Checking for more information
If you have not changed any ABI, and your platform always gives this
error, please configure with --abi-check-disable to skip this check
make: *** [all] Error 1

so performed

./configure --abi-update


3. Compile and install

   make && make install

4. the service may look for the smb.conf file in any of the two locations
based on your system

   /etc/samba/smb.conf

   or /usr/local/samba/etc/smb.conf

6.  cd /home/sai/samba-4.1.14/demo_vfs

7. ls

config.guess  config.status  configure     cscope.out  Makefile
module_config.h     README    vfs_demo.so
autogen.sh  config.log      config.sub     configure.in  install-sh
Makefile.in    module_config.h.in  vfs_demo.c

8. ./autogen.sh


9. ./configure --with-samba-source=/home/sai/samba-4.1.14/source3

10. make && make install

11. cp vfs_demo.so /usr/local/samba/lib/vfs


12. Add a share with vfs audit set

[share1]
        comment = new share

        path = /srv/samba/share1

         browsable = yes

       guest ok = yes

       readonly = no

       create mask = 0755

       vfs objects = /usr/local/samba/lib/vfs/vfs_demo

       vfs_demo :audit path = text1.txt

//vfs_demo -s symlink to vfs_demo.so

13. Run smbd and nmbd as daemons

   sudo restart smbd

   sudo restart nmbd

14. Access from windows or other smbclient.

15. smbd -V
 Version 3.6.3

16. smbd -b

Build environment:
   Built by:    buildd at orlo
   Built on:    Mon Jun 23 20:23:27 UTC 2014
   Built using: gcc
   Build host:  Linux orlo 2.6.42-58-generic #88-Ubuntu SMP Tue Dec 3
17:37:58 UTC 2013 i686 i686 i386 GNU/Linux
   SRCDIR:      /build/buildd/samba-3.6.3/source3
   BUILDDIR:    /build/buildd/samba-3.6.3/source3

Paths:
   SBINDIR: /usr/sbin
   BINDIR: /usr/bin
   SWATDIR: /usr/share/samba/swat
   CONFIGFILE: /etc/samba/smb.conf
   LOGFILEBASE: /var/log/samba
   LMHOSTSFILE: /etc/samba/lmhosts
   LIBDIR: /usr/lib/i386-linux-gnu
   MODULESDIR: /usr/lib/samba
   SHLIBEXT: so
   LOCKDIR: /var/run/samba
   STATEDIR: /var/lib/samba
   CACHEDIR: /var/cache/samba
   PIDDIR: /var/run/samba
   SMB_PASSWD_FILE: /etc/samba/smbpasswd
   PRIVATE_DIR: /etc/samba
   NCALRPCDIR: /var/ncalrpc
   NMBDSOCKETDIR: /var/run/samba

Builtin modules:
    pdb_ldap pdb_smbpasswd pdb_tdbsam pdb_wbc_sam idmap_tdb idmap_passdb
idmap_nss nss_info_template auth_sam auth_unix auth_winbind auth_wbc
auth_server auth_domain auth_builtin vfs_default vfs_posixacl


All this is done on Ubuntu System


I tried to recompile vfs_demo.c but error continues.
I am attaching vfs_demo.c

Do let me know if any error occured in steps performed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vfs_demo.c
Type: text/x-csrc
Size: 12920 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150223/9af3e3c3/attachment.c>


More information about the samba-technical mailing list