Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68107 - Can we have an ebuild for Samba 2 for a while?
Summary: Can we have an ebuild for Samba 2 for a while?
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Normal minor (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-19 00:47 UTC by Calum
Modified: 2005-02-09 13:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Calum 2004-10-19 00:47:19 UTC
I was dismayed to see that there were no ebuilds for Samba 2 any more. I upgraded to 3, but I have lots of problems.

For such a well used package, I think we should keep the latest stable secure version of Samba 2 for a good long while.

We shouldn't force people to upgrade to the latest, especially when many companies will be depending on this major piece of software. (And the same should apply to other "major" apps.)
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2004-10-20 04:08:06 UTC
get an old ebuild from here
http://www.gentoo.org/cgi-bin/viewcvs.cgi/net-fs/samba/
rename and try to compile
Comment 2 Christian Andreetta (RETIRED) gentoo-dev 2004-10-20 05:48:15 UTC
samba 3 is now the official stable tree, with the 2.2.x series been upstream deprecated.
Should you need a 2.x release, don't use anything lower than 2.2.12: there are many security flaws in versions before (upstream, not gentoo's :-) )
If you _really_ need it, we can manage that tree also, although time is somewhat scarce. What are the reasons that make you prefer 2.2.x?
Comment 3 Calum 2004-10-20 06:26:26 UTC
A couple of reasons so far. Maybe it's my configuration, but then again maybe not.

1. Samba 3 doesn't handle filenames that it doesn't understand very well. I have a few files in which the filename got corrupted. ls on the local disk shows, them, file <filename> works fine. I can see them over Samba, but when I try to access them, the debug logs show "file not found":

and I get a hang on the client. I used the v2 and v3 smbmount, but both don't help.

From the client syslog:

Oct 15 16:12:28 magpie kernel: smb_lookup: find filename failed, error=-5
Oct 15 16:12:28 magpie kernel: smb_add_request: request [cfd5ad80, mid=9316] timed out!
Oct 15 16:12:28 magpie kernel: smb_lookup: find //Unsorted failed, error=-5
Oct 15 16:12:58 magpie kernel: smb_add_request: request [cfd5ad80, mid=9317] timed out!
Oct 15 16:12:58 magpie kernel: smb_lookup: find //Unsorted failed, error=-5
Oct 15 16:13:28 magpie kernel: smb_add_request: request [cfd5ad80, mid=9318] timed out!
Oct 15 16:13:28 magpie kernel: smb_lookup: find //Unsorted failed, error=-5

And a slight variation:

Oct 15 16:49:19 magpie kernel: SMB connection re-established (-5)
Oct 15 16:50:50 magpie kernel: smb_file_read: filename validation failed, error= 4294967294
Oct 15 16:51:53 magpie kernel: smb_add_request: request [db516d80, mid=17655] timed out!
Oct 15 16:51:53 magpie kernel: smb_add_request: request [db516c80, mid=17656] timed out!
Oct 15 16:51:53 magpie kernel: smb_add_request: request [db516e80, mid=17657] timed out!

I exported the same dir with NFS, and it works fine. It's not permissions, and the local system can read the files fine.

Second problem (on a different server)
On the server I add a user calum, and add it to a group (dump).
I then give the group dump access to a dir, and share it out.
But it doesn't let me have access. It doesn't seem to respect group memberships any more.

Any more info needed, please let me know.
Comment 4 Calum 2004-10-21 00:28:19 UTC
Oh and another problem, since you asked :)
This is a problem with v2 and v3 of Samba - not just limited to v3.

I can't play 192kpbs MP3s from a Samba share mounted on my local box from a server over a direct 512kbs link without it stopping every 10 seconds of so. (it's an otherwise pretty much unused link)

Change it to NFS, and it plays perfectly. I've tried the TCP options, and NTU sizes, and making sure packets aren't fragmented and things like that. 
Comment 5 Christian Andreetta (RETIRED) gentoo-dev 2004-10-21 00:56:12 UTC
this and the other problems are probably due to configuration parameters. For example, your last could be resolved by the parameter "use sendfile=no" in smb.conf.
The others are maybe file mapping issues (man smb.conf on 'NAME MANGLING'). Samba 3 uses the same protocol as Win NT/2000, while samba 2 "was" mostly a Win 9x system.
just for reference: your 'emerge info'? 
Comment 6 Calum 2004-10-21 01:38:05 UTC
Hello.

Yes, the use sendfiles may well solve the performance problems. I shall try that later. (If it is the case, maybe a little comment in the smb.conf file for other users?)

tom root # emerge info
Portage 2.0.50-r11 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.7-hardened-r8)
=================================================================
System uname: 2.6.7-hardened-r8 i686 Intel(R) Pentium(R) III CPU family      1133MHz
Gentoo Base System version 1.4.10
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=i686 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl apache2 berkdb bitmap-fonts crypt cups f77 foomaticdb gd gdbm gmp gpm imap ipv6 jpeg kde ldap maildir mysql ncurses nls pam perl png postgres python readline slang ssl tiff truetype x86 xfs xml2 xprint zlib"

tom root # qpkg -I -v samba
net-fs/samba-3.0.5 *


Although I am using the hardened-dev sources, I am not using the PaX or Grsec features on this machine, and I am not using the stack protector version of GCC, so it is fairly standard.

I looked at the mangling features, but I'm not sure if they are what is needed. I have renamed most of the files that are affected :( (cos I was unable to read them over Samba otherwise).

And what about not being in the /etc/group group on the server?
Eg:
[group]
comment = Various group files
path = /raid/home/group
public = yes
writable = yes
inherit permissions = yes
invalid users = root

tom root # ls -ld /raid/home/group/gemini/
drwxrwsr-x    8 root     gemini       4096 Aug 23 12:11 /raid/home/group/gemini/

From what I remember, a user in the gemini group can't create files in this share over Samba. I tried compiling Samba with pam, and without pam support, but it didn't make any difference.

Thanks for all your help on this - I appreciate that this isn't a Samba support forum.
Comment 7 Calum 2004-10-22 08:40:32 UTC
I did a fresh install of samba today:

I only added:
use sendfile = no
[share]
        path = /home/share
        readonly = yes

to smb.conf and added myself a user account.

I mount it with smbmount on the client, and when I access the files, on the client I see in the logs:

Oct 22 16:34:11 magpie kernel: smb_add_request: request [de1dce80, mid=2481] timed out!
Oct 22 16:34:11 magpie kernel: smb_add_request: request [de1dcd80, mid=2482] timed out!
Oct 22 16:34:11 magpie kernel: smb_add_request: request [de1dcc80, mid=2483] timed out!
Oct 22 16:34:11 magpie kernel: smb_add_request: request [de1dcb80, mid=2484] timed out!
Oct 22 16:34:11 magpie kernel: smb_lookup: find Dir/AnotherDir failed, error=-5
Oct 22 16:34:41 magpie kernel: smb_add_request: request [de1dce80, mid=2485] timed out!
Oct 22 16:34:41 magpie kernel: smb_add_request: request [de1dcd80, mid=2486] timed out!
Oct 22 16:34:41 magpie kernel: smb_add_request: request [de1dcb80, mid=2487] timed out!
Oct 22 16:35:11 magpie kernel: smb_add_request: request [de1dce80, mid=2488] timed out!
Oct 22 16:35:11 magpie kernel: smb_add_request: request [de1dcd80, mid=2489] timed out!
Oct 22 16:35:11 magpie kernel: smb_add_request: request [de1dcb80, mid=2490] timed out!
Oct 22 16:35:41 magpie kernel: smb_add_request: request [de1dce80, mid=2491] timed out!
Oct 22 16:35:41 magpie kernel: smb_file_read: Dir/File.ext validation failed, error=4294967291
Oct 22 16:35:41 magpie kernel: smb_add_request: request [de1dcd80, mid=2492] timed out!
Oct 22 16:35:42 magpie kernel: smb_add_request: request [de1dcb80, mid=2493] timed out!
Oct 22 16:35:42 magpie kernel: smb_lookup: find Dir/AnotherDir failed, error=-5
Oct 22 16:35:42 magpie kernel: smb_receive_header: short packet: 0
Oct 22 16:36:11 magpie kernel: smb_add_request: request [de1dcd80, mid=2494] timed out!
Oct 22 16:36:12 magpie kernel: smb_add_request: request [de1dcb80, mid=2495] timed out!
Oct 22 16:36:12 magpie kernel: smb_add_request: request [de1dce80, mid=2496] timed out!


After several minutes, I can access one file, before it starts given me another round of errors, this time with different codes.

Oct 22 16:38:41 magpie kernel: smb_add_request: request [c67bed80, mid=3308] timed out!
Oct 22 16:38:41 magpie kernel: smb_add_request: request [c67bee80, mid=3309] timed out!
Oct 22 16:38:41 magpie kernel: smb_add_request: request [c67bec80, mid=3310] timed out!
etc etc.
Comment 8 Calum 2004-10-28 08:56:19 UTC
Another problem which I didn't get in 2.

bash-2.05b$ grep MOUNT /etc/fstab
//torro/share   /home/calum/MOUNT    smbfs   noauto,users,username=calum     0 0
bash-2.05b$ mount MOUNT/
Password:
bash-2.05b$

In syslog on the client:
Oct 28 16:06:40 magpie kernel: smbfs: Unrecognized mount option noexec
Oct 28 16:06:40 magpie kernel: grsec: mount //torro/share to . by /usr/bin/smbmnt[smbmnt:28616] uid/euid:1000/0 gid/egid:100/100, parent /usr/bin/smbmount[mount.smbfs:19260] uid/euid:1000/1000 gid/egid:100/100

Where did the noexec come from?
Then, without doing anything, after a bit, the connection dies:
Oct 28 16:49:11 magpie kernel: smb_add_request: request [c6795e80, mid=12552] timed out!
Oct 28 16:49:14 magpie kernel: smb_add_request: request [c6795d80, mid=12553] timed out!
Oct 28 16:49:41 magpie kernel: smb_add_request: request [c6795e80, mid=12554] timed out!
Oct 28 16:50:11 magpie kernel: smb_add_request: request [c6795e80, mid=12555] timed out!
Oct 28 16:50:41 magpie kernel: smb_add_request: request [c6795e80, mid=12556] timed out!
Oct 28 16:51:11 magpie kernel: smb_add_request: request [c6795e80, mid=12557] timed out!
Oct 28 16:52:03 magpie kernel: smb_lookup: find //Some_Dir failed, error=-512
Oct 28 16:52:20 magpie kernel: smb_lookup: find //Another_Dir failed, error=-512

If I umount MOUNT/ and remount it, it continues working until next time.

What is causing this?
Comment 9 Doug Goldstein (RETIRED) gentoo-dev 2004-12-25 20:42:02 UTC
The reason the user calum can't create files in /raid/home/group/gemini/ is due to file permissions on that folder. Look at them and fix them. 

As far as the noexec option, it looks like your use of hardened sources is causing that part. Look at the log file, grsec is kicking in.

Try using a non-hardened sources kernel for a test, like gentoo-dev-sources.

As far as the rest of your problems, I recommend you read the Samba Guide/Manual from http://www.samba.org and read man smb.conf.
Comment 10 Calum 2005-02-09 13:54:58 UTC
I'll mark this as fixed. Using mount.cifs //server/share has helped a lot. I never heard about that change.