[Samba] Samba 2.2.8 and below VFS BUG REPORT

Chris Gleba chris at soma.978.org
Mon Apr 14 20:27:07 GMT 2003


To whom this may concern:

I think I may have encountered an obscure and non-critical 
bug in vfs.c.  Below I will explain it, however if you have any
questions or need any clarification feel free to email me (please copy
me with replies to the list as I am not a member of the list).

There are three sections to this report:

1) DESCRIPTION - detailed description of the bug
2) TESTING - basics tests that to show it is not me
3) TESTPARM - output from testparm

I have checked google groups, the mailing list archives as well as the
samba documentation and could not find any relevant information about
this bug.

I have attempted to make the bug report as detailed and specific as
possible.  Let me know if such bug reports help and I will continue
to send any when I encounter problems that I almost certain are bugs.

--------------------------DESCRIPTION-----------------------------

VERSIONS EFFECTED:

This bug has been reproduced on: 
Samba Versions: 2.2.8, 2.2.6, 2.2.3, 2.2.0

Kernels reproduced on: 2.2.18, 2.2.19, 2.4.20, 2.4.21-pre5

Clients: Windows98 OSR2

With both Mandrake-distributed RPMS and built-from-source installs from
samba.org.

SYMPTOM:

Users complain that when they "browse" the shares on the samba server
(nothing particular) that every once in a while it will "pause" for a
long time and then display directory.  This is accompanied by errors in
the log files which I will present below.

INFORMATION:

I have a samba share with many iso images mounted on the loopback
interface within them.  This error occurs regardless if they are
browsing the files within the loopback iso, however it only occurs when
they are accessing the share that contains the loopback isos.

* Here is one such example:

A Mandrake ISO is mounted on loopback (as 'df -h' shows):

/home/pub/Software/linux/dist/mandrake/8.0/i586/8.0-Traktopel-rc1-CD1.i586.iso
                      636M  636M     0 100% 
/home/pub/Software/linux/dist/mandrake/8.0-Traktopel-rc1-CD1.i586

* And the share is defined as (some things are mangled with 'X' for
security):

[documents]
   comment = Internal Server Documents -- Map to a Windows drive letter
   path = /home/pub
   public = yes
   writable = yes
   printable = no
   create mask = 7777
   directory mask = 7777
   force create mode = 0664
   force directory mode = 0775
   guest ok = yes
   hide dot files = yes
   hide files = bin/lib/etc/msgs/ls-lR/mounts/
   level2 oplocks = true
   oplocks = true
   veto oplock files = =
/*.ldb/*.LDB/*.mdb/*.MDB/*XXXXX/*XXXXX/*XXXXXX/XXXX*/XXXX*/

Once in a while when a user browses the share, the following errors show
up over and over again in the logs:

[2003/04/14 12:02:58, 2] smbd/vfs.c:readlink_check(755)
  Bad access attempt?
s=/home/pub/Software/linux/dist/mandrake/8.0/i586/8.0-Traktopel-rc1-CD1.i586/Mandrake/mdkinst/usr/lib/X11 dir=/home/pub newname=/home/X11R6/lib/X11ä-@Üÿ¿] l=9
[2003/04/14 12:02:58, 2] smbd/vfs.c:reduce_name(864)
  Bad access attemt?
Software/linux/dist/mandrake/8.0/i586/8.0-Traktopel-rc1-CD1.i586/Mandrake/mdkinst/usr/lib/X11 is a symlink outside the share pathBad access attempt? s=/home/pub/Software/linux/dist/mandrake/8.0/i586/8.0-Traktopel-rc1-CD1.i586/Mandrake/mdkinst/usr/share/locale/ISO-8859-15/LC_MESSAGES dir=/home/pub newname=/home/UTF-8/LC_MESSAGES@Üÿ¿q l=9
[2003/04/14 12:03:01, 2] smbd/vfs.c:reduce_name(864)
  Bad access attemt?
Software/linux/dist/mandrake/8.0/i586/8.0-Traktopel-rc1-CD1.i586/Mandrake/mdkinst/usr/share/locale/af/LC_MESSAGES is a symlink outside the share pathBad access attempt? s=/home/pub/Software/linux/dist/mandrake/8.0/i586/8.0-Traktopel-rc1-CD1.i586/Mandrake/mdkinst/usr/share/locale/CP1256/LC_MESSAGES dir=/home/pub newname=/home/UTF-8/LC_MESSAGES@Üÿ¿q l=9

Note that the "readlink_check" only shows up once and that it is the
"reduce_name" that occurs over and over again.  Also note that the
output in the logs gets garbled when this occurs -- it is not a
mis-paste or typo.  Perhaps this could be a buffer over-run?

Please also note that anything under
"/home/pub/Software/linux/dist/mandrake/8.0/i586/8.0-Traktopel-rc1-CD1.i586"
resides on an ISO image mounted to loopback and that the files it
complains about (and subsequently garbled) have no particular pattern
other then they are on an ISO loopback.  Some, but not all, of the files
it complains about such as:

/home/pub/Software/linux/dist/mandrake/8.0/i586/8.0-Traktopel-rc1-CD1.i586/Mandrake/mdkinst/usr/lib/X11

Are soft links back to previous directories (that do exist) within the
mounted iso:

[root at photon lib]# pwd
/home/pub/Software/linux/dist/mandrake/8.0/i586/8.0-Traktopel-rc1-CD1.i586/Mandrake/mdkinst/usr/lib
[root at photon lib]# ls -la
total 29
dr-xr-xr-x    7 root     root         2048 Apr  8  2001 ./
dr-xr-xr-x    7 root     root         2048 Apr  8  2001 ../
lr-xr-xr-x    4 root     root           16 Jan  4  2001 X11 ->
../X11R6/lib/X11/
dr-xr-xr-x    2 root     root         6144 Apr  8  2001 gconv/
dr-xr-xr-x    3 root     root         2048 Apr  8  2001 gtk/
dr-xr-xr-x    4 root     root         2048 Apr  8  2001 kbd/
-r-xr-xr-x    4 root     root        10808 Apr  6  2001 libimlib-png.so*
dr-xr-xr-x    4 root     root         2048 Apr  8  2001 perl5/
dr-xr-xr-x    2 root     root         2048 Apr  8  2001 rpm/

When the loopback isos are umounted, the errors disappear.  Note that
everything else in the share other then the loopback ISOs are on one
partition with a Reiserfs filesystem ( version 3.6.25 ).

Below is my output from testparm (with some vales mangled with 'X' for
security):

----------------------------TESTING-------------------------------

NETWORK:

Network is fine:
	* FTP transfers at 8 MB/s
	* SMB transfers at 7 MB/s
	* netperf reports 95.5 Mbit/s
	* TX/RX on card reports errors:0 dropped:0 overruns:0 frame:0

SMB is fine:
	* no errors in the logs other then the one mentioned above,
	  password errors (expected) and chmod errors (expected).

Computer is fine:
	* no hardware errors in the syslog at all

----------------------------TESTPARM-------------------------------

# Global parameters
[global]
        coding system = 
        client code page = 850
        code page directory = /var/lib/samba/codepages
        workgroup = XXX
        netbios name = XXXXXX
        netbios aliases = XXXXXX
        netbios scope = 
        server string = XXX Disk/Internet Server
        interfaces = XXX.XXX.X.X/XX
        bind interfaces only = Yes
        security = USER
        encrypt passwords = Yes
        update encrypted = No
        allow trusted domains = Yes
        hosts equiv = 
        min passwd length = 5
        map to guest = Bad User
        null passwords = Yes
        obey pam restrictions = No
        password server = 
        smb passwd file = /etc/samba/smbpasswd
        root directory = 
        pam password change = No
        passwd program = /usr/bin/passwd %u
        passwd chat = *New*UNIX*password* %n\n
*ReType*new*UNIX*password* %n\n
*passwd:*all*authentication*tokens*updated*successfully*
        passwd chat debug = No
        username map = /etc/samba/smbusers
        password level = 0
        username level = 15
        unix password sync = Yes
        restrict anonymous = No
        lanman auth = Yes
        use rhosts = No
        admin log = No
        log level = 2
        syslog = 1
        syslog only = No
        log file = /var/log/samba/log.%m
        max log size = 150
        timestamp logs = Yes
        debug hires timestamp = No
        debug pid = No
        debug uid = No
        protocol = NT1
        large readwrite = Yes
        max protocol = NT1
        min protocol = CORE
        read bmpx = No
        read raw = Yes
        write raw = Yes
        acl compatibility = 
        nt smb support = Yes
        nt pipe support = Yes
        nt status support = Yes
        announce version = 4.9
        announce as = NT
        max mux = 50
        max xmit = 16644
        name resolve order = host wins lmhosts bcast
        max ttl = 259200
        max wins ttl = 518400
        min wins ttl = 21600
        time server = Yes
        unix extensions = No
        change notify timeout = 300
        deadtime = 0
        getwd cache = Yes
        keepalive = 0
        lpq cache time = 10
        max smbd processes = 0
        max disk size = 0
        max open files = 10000
        name cache timeout = 660
        read size = 32768
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192
SO_KEEPALIVE
        stat cache size = 50
        use mmap = Yes
        total print jobs = 0
        load printers = Yes
        printcap name = cups
        disable spoolss = No
        enumports command = 
        addprinter command = 
        deleteprinter command = 
        show add printer wizard = Yes
        os2 driver map = 
        strip dot = No
        mangling method = hash
        character set = 
        mangled stack = 50
        stat cache = Yes
        domain admin group = 
        domain guest group = 
        machine password timeout = 604800
        add user script = 
        delete user script = 
        logon script = 
        logon path = \\%N\%U\profile
        logon drive = 
        logon home = \\%N\%U
        domain logons = Yes
        os level = 65
        lm announce = No
        lm interval = 60
        preferred master = Yes
        local master = Yes
        domain master = Yes
        browse list = Yes
        enhanced browsing = Yes
        dns proxy = Yes
        wins proxy = Yes
        wins server = 
        wins support = Yes
        wins hook = 
        kernel oplocks = No
        lock spin count = 3
        lock spin time = 10
        oplock break wait time = 0
        add share command = 
        change share command = 
        delete share command = 
        config file = 
        preload = 
        lock dir = /var/cache/samba
        pid directory = /var/run/samba
        utmp directory = 
        wtmp directory = 
        utmp = No
        default service = 
        message command = csh -c 'xedit %s;rm %s' &
        dfree command = 
        valid chars = 
        remote announce = XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX
        remote browse sync = 
        socket address = 0.0.0.0
        homedir map = auto.home
        time offset = 0
        NIS homedir = No
        source environment = 
        panic action = 
        hide local users = No
        host msdfs = No
        winbind uid = 
        winbind gid = 
        template homedir = /home/%D/%U
        template shell = /bin/false
        winbind separator = \
        winbind cache time = 15
        winbind enum users = Yes
        winbind enum groups = Yes
        winbind use default domain = No
        comment = 
        path = 
        alternate permissions = No
        username = 
        guest account = anonymous
        invalid users = 
        valid users = 
        admin users = 
        read list = ftp
        write list = 
        printer admin = root, +ntadmin
        force user = 
        force group = 
        read only = Yes
        create mask = 0744
        force create mode = 00
        security mask = 0777
        force security mode = 00
        directory mask = 0755
        force directory mode = 00
        directory security mask = 0777
        force directory security mode = 00
        force unknown acl user = 00
        inherit permissions = No
        inherit acls = No
        guest only = No
        guest ok = No
        only user = No
        hosts allow = 192.168.0. 127. 192.168.148.
        hosts deny = 
        status = Yes
        nt acl support = Yes
        profile acls = No
        block size = 1024
        max connections = 0
        min print space = 0
        strict allocate = No
        strict sync = No
        sync always = No
        use sendfile = No
        write cache size = 65536
        max print jobs = 1000
        printable = No
        postscript = No
        printing = cups
        print command = lpr -r -P%p %s
        lpq command = lpq -P%p
        lprm command = lprm -P%p %j
        lppause command = 
        lpresume command = 
        queuepause command = 
        queueresume command = 
        printer name = 
        use client driver = No
        default devmode = No
        printer driver = 
        printer driver file = /etc/samba/printers.def
        printer driver location = 
        default case = lower
        case sensitive = No
        preserve case = Yes
        short preserve case = Yes
        mangle case = No
        mangling char = ~
        hide dot files = Yes
        hide unreadable = No
        delete veto files = No
        veto files = 
        hide files = netlogon/
        veto oplock files = 
        map system = No
        map hidden = No
        map archive = Yes
        mangled names = Yes
        mangled map = 
        browseable = Yes
        blocking locks = Yes
        csc policy = manual
        fake oplocks = No
        locking = Yes
        oplocks = Yes
        level2 oplocks = Yes
        oplock contention limit = 2
        posix locking = Yes
        strict locking = No
        share modes = Yes
        copy = 
        include = 
        exec = 
        preexec close = No
        postexec = 
        root preexec = 
        root preexec close = No
        root postexec = 
        available = Yes
        volume = 
        fstype = NTFS
        set directory = No
        wide links = No
        follow symlinks = Yes
        dont descend = 
        magic script = 
        magic output = 
        delete readonly = No
        dos filemode = No
        dos filetimes = No
        dos filetime resolution = No
        fake directory create times = No
        vfs object = 
        vfs options = 
        msdfs root = No

[homes]
        comment = Home Directory -- Only Viewable by You
        path = /home/%u
        read only = No
        create mask = 0600
        force create mode = 0600
        directory mask = 0700
        force directory mode = 0700
        guest ok = Yes
        browseable = No

[public_html]
        comment = Put your web pages here
        path = /home/%u/public_html
        read only = No
        create mask = 0755
        force create mode = 0644
        force directory mode = 0755
        guest ok = Yes

[tmp]
        comment = Temporary file space
        path = /home/pub/tmp
        read only = No
        create mask = 07777
        force create mode = 0664
        directory mask = 07777

[documents]
        comment = Internal Server Documents -- Map to a Windows drive
letter
        path = /home/pub
        read only = No
        create mask = 07777
        force create mode = 0664
        directory mask = 07777
        force directory mode = 0775
        guest ok = Yes
        hide files = bin/lib/etc/msgs/ls-lR/mounts/
        veto oplock files =
/*.ldb/*.LDB/*.mdb/*.MDB/*XXXXXX/*XXXX/*XXXXXX/XXXX*/XXXX*/

[pchome]
        comment = Put Your Private PC Files Here.
        path = /home/pchome/%u
        read only = No
        create mask = 0600
        force create mode = 0600
        directory mask = 0700
        force directory mode = 0700
        guest ok = Yes
        hide files = bin/lib/etc/

[backups]
        comment = Weekly online backups of all files
        path = /mnt/backup
        guest ok = Yes
        fake oplocks = Yes

[printers]
        comment = XXXXXXXXXXXX
        path = /var/spool/samba
        printer admin = root
        guest ok = Yes
        printable = Yes
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers
        write list = root
        guest ok = Yes

--------------------------------------------------------------------------------------------

-- Chris Gleba
 _________________________________
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       _/ _/         _/
    _/   _/                  ||||
   _/   _/_/_/ _/_/ _/ _/_/  c ..
  _/   _/  _/ _/   _/  _/    \  >
   _/ _/  _/ _/   _/ _/_/     \_-

  ==>chris at soma.978.org<==
 _________________________________ 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the samba mailing list