[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 95bf43b s3: libsmbclient - smb2. MacOSX 10 SMB2 server doesn't set STATUS_NO_MORE_FILES when handed a non-wildcard path. from 4bec186 samba-tool group add: Add option --nis-domain and --gid http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 95bf43bc6a0b6a4a47b8a556eee3b78446ea4123 Author: Jeremy Allison j...@samba.org Date: Tue Oct 21 14:41:32 2014 -0700 s3: libsmbclient - smb2. MacOSX 10 SMB2 server doesn't set STATUS_NO_MORE_FILES when handed a non-wildcard path. Signed-off-by: Jeremy Allison j...@samba.org Reviewed-by: Steve French smfre...@gmail.com Tested-by: Ralph Boehme s...@samba.org Autobuild-User(master): Steve French sfre...@samba.org Autobuild-Date(master): Thu Oct 23 20:44:31 CEST 2014 on sn-devel-104 --- Summary of changes: source3/libsmb/cli_smb2_fnum.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index a099e03..de4bd6f 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -667,6 +667,7 @@ NTSTATUS cli_smb2_list(struct cli_state *cli, bool processed_file = false; TALLOC_CTX *frame = talloc_stackframe(); TALLOC_CTX *subframe = NULL; + bool mask_has_wild; if (smbXcli_conn_has_async_calls(cli-conn)) { /* @@ -690,6 +691,8 @@ NTSTATUS cli_smb2_list(struct cli_state *cli, goto fail; } + mask_has_wild = ms_has_wild(mask); + status = cli_smb2_create_fnum(cli, parent_dir, 0, /* create_flags */ @@ -791,6 +794,17 @@ NTSTATUS cli_smb2_list(struct cli_state *cli, TALLOC_FREE(subframe); + if (!mask_has_wild) { + /* +* MacOSX 10 doesn't set STATUS_NO_MORE_FILES +* when handed a non-wildcard path. Do it +* for the server (with a non-wildcard path +* there should only ever be one file returned. +*/ + status = STATUS_NO_MORE_FILES; + break; + } + } while (NT_STATUS_IS_OK(status)); if (NT_STATUS_EQUAL(status, STATUS_NO_MORE_FILES)) { -- Samba Shared Repository
Re: [Samba] Trouble with mount.cifs while smbclient works (Ubuntu 12.04)
On Sat, May 19, 2012 at 9:52 AM, scott_purc...@dell.com wrote: Is there any workaround? Fixing the permissions on the parent directory so it can be traversed is not possible? From: Jeff Layton [jlay...@poochiereds.net] On Behalf Of Jeff Layton [jlay...@samba.org] Sent: Saturday, May 19, 2012 7:37 AM To: Purcell, Scott Cc: li...@kukkukk.com; samba@lists.samba.org; linux-c...@vger.kernel.org Subject: Re: [Samba] Trouble with mount.cifs while smbclient works (Ubuntu 12.04) On Fri, 18 May 2012 16:32:29 -0500 scott_purc...@dell.com wrote: Yes, I think that has been the normal behavior since our data was moved to this device. I assumed it was due to filesystem permissions -- that I don't have read access to the root level of the share, but do have r/w access to the /training/ directory below it. Using smbclient, get NT_STATUS_ACCESS_DENIED when I try: ls ls training ls /training ls /training/ but if I cd to training, I can list its contents. BTW, I've tried appending the path in my mount command as well and mount.cifs still doesn't handle it: Known problem since the superblock sharing patches went in. cifs.ko needs to establish a dentry and inode for the root of the share and then walks down to the prefixpath for the mount. Unfortunately if you don't have access to any point along that path, the mount will fail. There have been a couple of proposals to fix it, but they've had their own problems. What probably needs to happen is to do something like what NFS does in its superblock sharing model. Allow several trees of dentries within a superblock and only connect them later if we happen to stumble across the right entry. See commit 54ceac45159 for an explanation of the model NFS uses for this. -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Thanks, Steve -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Trouble with mount.cifs while smbclient works (Ubuntu 12.04)
Don't want to forget is to open a bug report (at bugzilla.samba.org) if you haven't already created one - even if tricky to fix safely, I don't want to lose track of this issue if we can find a way to safely handle this case. There is a lot going on in development of cifs.ko with smb2 enablement and the introduction of SMB 3 (and also some dramatic performance improvements that went in over the last four releases). On Sat, May 19, 2012 at 6:20 PM, scott_purc...@dell.com wrote: I'll inquire. But we're a very windows-centric shop -- I may be given the old Working as designed... if it won't work on Linux you'll have to use Windows routine... Scott Purcell Content Development: Linux, Virtualization, and Cloud Solutions Dell | GSD Learning Development From: Steve French [smfre...@gmail.com] Sent: Saturday, May 19, 2012 10:25 AM To: Purcell, Scott Cc: jlay...@samba.org; li...@kukkukk.com; samba@lists.samba.org; linux-c...@vger.kernel.org Subject: Re: [Samba] Trouble with mount.cifs while smbclient works (Ubuntu 12.04) On Sat, May 19, 2012 at 9:52 AM, scott_purc...@dell.com wrote: Is there any workaround? Fixing the permissions on the parent directory so it can be traversed is not possible? From: Jeff Layton [jlay...@poochiereds.net] On Behalf Of Jeff Layton [jlay...@samba.org] Sent: Saturday, May 19, 2012 7:37 AM To: Purcell, Scott Cc: li...@kukkukk.com; samba@lists.samba.org; linux-c...@vger.kernel.org Subject: Re: [Samba] Trouble with mount.cifs while smbclient works (Ubuntu 12.04) On Fri, 18 May 2012 16:32:29 -0500 scott_purc...@dell.com wrote: Yes, I think that has been the normal behavior since our data was moved to this device. I assumed it was due to filesystem permissions -- that I don't have read access to the root level of the share, but do have r/w access to the /training/ directory below it. Using smbclient, get NT_STATUS_ACCESS_DENIED when I try: ls ls training ls /training ls /training/ but if I cd to training, I can list its contents. BTW, I've tried appending the path in my mount command as well and mount.cifs still doesn't handle it: Known problem since the superblock sharing patches went in. cifs.ko needs to establish a dentry and inode for the root of the share and then walks down to the prefixpath for the mount. Unfortunately if you don't have access to any point along that path, the mount will fail. There have been a couple of proposals to fix it, but they've had their own problems. What probably needs to happen is to do something like what NFS does in its superblock sharing model. Allow several trees of dentries within a superblock and only connect them later if we happen to stumble across the right entry. See commit 54ceac45159 for an explanation of the model NFS uses for this. -- Jeff Layton jlay...@samba.org -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Thanks, Steve -- Thanks, Steve -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Transfer speed
On 03:06:34 wrote Stan Hoeppner: On 4/10/2012 9:36 AM, Volker Lendecke wrote: On Tue, Apr 10, 2012 at 08:55:14AM -0500, Chris Weiss wrote: On Tue, Apr 10, 2012 at 8:53 AM, Volker Lendecke Volker.Lendecke at sernet.de wrote: On Tue, Apr 10, 2012 at 08:26:48AM -0500, Chris Weiss wrote: that's dramatic! what needs done (from a user POV) to get this backported into Stable distro kernels? suggestions? Wait until the next major releases pick it up. that's a really crappy option. in certain cases that could be 4 years from now. Well, if you are an important enough RH customer you might be able to apply pressure. But that's a LOT of money probably. Same for SuSE. Debian will likely be very resistant against that kind of bribery^Wincentive. Debian already has 3.2.6 available in the stable repo: $ aptitude search linux-image ... i linux-image-3.2.6 - Linux kernel, version 3.2.6 ... My Fedora is running 3.3 and performance screams with reads and writes over cifs, especially to Samba. At least SuSE and RHEL6.2 appear to have upgraded their kernel far enough to get the really fast writes over cifs. Jeff Layton did a good job on these performance patches. Hard to complain about 95% network utilization (and it will get even better when the SMB2 and SMB2.1 support is merged). You will be even happier with 3.4 kernel on the client because then you can get even more parallelism (assuming you have a big set of disks to distribute work across on your server) when you set much larger values for max mux in the server's smb.conf you will be able to get up to 32768 requests in parallel queued to Samba. With today's networks and Samba the default for servers (of 50) is way too low - and with 3.4 kernel cifs client we will be able to send even more requests in parallel if the server indicates it can support it (more than 50 maximum multiplex requests). Note that Linux cifs kernel client always supported great parallelism and would easily use most of the network bandwidth if multiple processes were doing i/o against multiple files on the same mount - but with 3.0 (for sequential write like file copies) and later kernels for reads - cifs is VERY fast now. Prior to 3.0 kernel for fast file copies from Windows or Samba servers you can use smbclient (user space tool) which due to good work by Volker has had nice performance for sequential read/wirte for a few years. -- Thanks, Steve -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Transfer speed
On 03:06:34 wrote Stan Hoeppner: On 4/10/2012 9:36 AM, Volker Lendecke wrote: On Tue, Apr 10, 2012 at 08:55:14AM -0500, Chris Weiss wrote: On Tue, Apr 10, 2012 at 8:53 AM, Volker Lendecke Volker.Lendecke at sernet.de wrote: On Tue, Apr 10, 2012 at 08:26:48AM -0500, Chris Weiss wrote: that's dramatic! what needs done (from a user POV) to get this backported into Stable distro kernels? suggestions? Wait until the next major releases pick it up. that's a really crappy option. in certain cases that could be 4 years from now. Well, if you are an important enough RH customer you might be able to apply pressure. But that's a LOT of money probably. Same for SuSE. Debian will likely be very resistant against that kind of bribery^Wincentive. Debian already has 3.2.6 available in the stable repo: $ aptitude search linux-image ... i linux-image-3.2.6 - Linux kernel, version 3.2.6 ... My Fedora is running 3.3 and performance screams with reads and writes over cifs, especially to Samba. At least SuSE and RHEL6.2 appear to have upgraded their kernel far enough to get the really fast writes over cifs. Jeff Layton did a good job on these performance patches. Hard to complain about 95% network utilization (and it will get even better when the SMB2 and SMB2.1 support is merged). You will be even happier with 3.4 kernel on the client because then you can get even more parallelism (assuming you have a big set of disks to distribute work across on your server) when you set much larger values for max mux in the server's smb.conf you will be able to get up to 32768 requests in parallel queued to Samba. With today's networks and Samba the default for servers (of 50) is way too low - and with 3.4 kernel cifs client we will be able to send even more requests in parallel if the server indicates it can support it (more than 50 maximum multiplex requests). Note that Linux cifs kernel client always supported great parallelism and would easily use most of the network bandwidth if multiple processes were doing i/o against multiple files on the same mount - but with 3.0 (for sequential write like file copies) and later kernels for reads - cifs is VERY fast now. Prior to 3.0 kernel for fast file copies from Windows or Samba servers you can use smbclient (user space tool) which due to good work by Volker has had nice performance for sequential read/wirte for a few years. -- Thanks, Steve -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] cifs and Netapp DFS-shares problems
On Fri, Dec 10, 2010 at 5:34 AM, Jeff Layton jlay...@samba.org wrote: On Fri, 10 Dec 2010 11:25:46 +0100 Marcus li...@localguru.de wrote: Any ideas? Seems to be an error of the NetApp Fileserver acting not RFC conform. Is this the right list to discuss or should I post on linux-cifs-client list? (cc'ing linux-cifs mailing list) Probably because the ls is hung and is holding references to the mount... I've successfully tested against netapp's CIFS implementation in the past, but there are significant bugs in it. The errors you're seeing look like an alignment problem of some sort -- i.e. the server is sending packets that have incorrect length fields in them. This isn't the first such problem I've seen with OnTap. You're welcome to open a bug at bugzilla.samba.org, cc me, and I'll take a look when I have time. Gathering wire captures during one of these events and attaching them to the bug would help to track down the problem. It's likely to be Netapp's bug however... We have worked around a few similar sounding server bugs in the past, but have to be careful that we don't introduce potential buffer overruns or security problems (the Linux cifs client parses frames more carefully than some other clients to reduce the chance of going beyond the end of frames). -- Thanks, Steve -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] question about CIFS client glitches
On Thu, Sep 16, 2010 at 4:39 PM, starli...@binnacle.cx wrote: Hello, Trying out a CIFS mount of a W2K8 x64 file system from CentOS 5.5 and running into problems, and trying to figure out how to proceed. I mount up the Windows share, then run a script that expands about ten TAR format archives containing a couple of hundred files with the 'pax' utility. Then it removes about two dozen files. The script is a primitive source-code version extractor. Unfortunately the resulting tree is quite incorrect. Some of the files that should be deleted by the 'rm' commands are not, and some of the files that should be there from the expansion are missing. The script works fine with EXT2/3/4 and NFSv3 mounts. So it seems to me CIFS mounts are not ready for use in production or development. Before I give up, is there anything obvious that I'm missing? I searched for relevant bugs in Red Hat, Samba and Kernel.org bugzillas and didn't find anything that seems to match. The version mix in use is a little odd. The kernel and 'cifs.ko' modules are pure RHEL/CentOS version 2.6.18-194.11.3.el5, This is quite old kernel, but perhaps it was updated to include more recent fixes - can you view the version information on the file, ie the cifs.ko module (you can do this by running modinfo on cifs.ko) -- Thanks, Steve -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] question about CIFS client glitches
On Thu, Sep 16, 2010 at 7:00 PM, starli...@binnacle.cx wrote: At 05:50 PM 9/16/2010 -0500, Steve French wrote: On Thu, Sep 16, 2010 at 4:39 PM, starli...@binnacle.cx wrote: Trying out a CIFS mount of a W2K8 x64 file system from CentOS 5.5 and running into problems, and trying to figure out how to proceed. ... This is quite old kernel, but perhaps it was updated to include more recent fixes - can you view the version information on the file, ie the cifs.ko module (you can do this by running modinfo on cifs.ko) Thank you for the follow-up. Per my last message this was my being a clueless in regards to the lack of hard/soft link support in the old version. 'modinfo' pegs it as 1.60RH. Hopefully RHEL6 will include CIFS file links as it might work better to compile on Linux from a Windows share rather than vice-versa. 'makedepend' runs painfully slow from Windows over a Samba share unless IPoIB is used for transport. Perhaps I'll try it under Fedora, though in general I find wrestling with the constant change of the moving-target distro too much. It is quite encouraging to see CIFS work in general. There is a lot of work going on :) We (Jeff, Suresh, Shirish, Pavel and I and others) are doing over 200 changesets a year fixing/improving the cifs kernel module (and hopefully will have a stable smb2 protocol kernel module for you next year). -- Thanks, Steve -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-1113-gd3b91e4
The branch, v3-2-test has been updated via d3b91e494c824a65506ba1bc1cba5bba77000530 (commit) via b9d2da4d10e6e7ac2dc604565c7f2ce39d0916b5 (commit) from 3e3205309b75edf7d29633525adfdceb5f8856eb (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit d3b91e494c824a65506ba1bc1cba5bba77000530 Merge: b9d2da4d10e6e7ac2dc604565c7f2ce39d0916b5 3e3205309b75edf7d29633525adfdceb5f8856eb Author: Steve French [EMAIL PROTECTED] Date: Sat Jan 5 14:51:23 2008 -0600 Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test commit b9d2da4d10e6e7ac2dc604565c7f2ce39d0916b5 Author: Steve French [EMAIL PROTECTED] Date: Thu Jan 3 17:13:38 2008 -0600 Update mount.cifs help Steve --- Summary of changes: source/client/mount.cifs.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c index a25ccc5..79f402a 100644 --- a/source/client/mount.cifs.c +++ b/source/client/mount.cifs.c @@ -39,7 +39,7 @@ #include fcntl.h #define MOUNT_CIFS_VERSION_MAJOR 1 -#define MOUNT_CIFS_VERSION_MINOR 10 +#define MOUNT_CIFS_VERSION_MINOR 11 #ifndef MOUNT_CIFS_VENDOR_SUFFIX #ifdef _SAMBA_BUILD_ @@ -136,14 +136,16 @@ static void mount_cifs_usage(void) printf(\nLess commonly used options:); printf(\n\tcredentials=filename,guest,perm,noperm,setuids,nosetuids,rw,ro,); printf(\n\tsep=char,iocharset=codepage,suid,nosuid,exec,noexec,serverino,); - printf(\n\tdirectio,mapchars,nomapchars,nolock,servernetbiosname=SRV_RFC1001NAME); + printf(\n\tmapchars,nomapchars,nolock,servernetbiosname=SRV_RFC1001NAME); + printf(\n\tdirectio,nounix,cifsacl,sec=authentication mechanism,sign); printf(\n\nOptions not needed for servers supporting CIFS Unix extensions); printf(\n\t(e.g. unneeded for mounts to most Samba versions):); printf(\n\tuid=uid,gid=gid,dir_mode=mode,file_mode=mode,sfu); printf(\n\nRarely used options:); printf(\n\tport=tcpport,rsize=size,wsize=size,unc=unc_name,ip=ip_address,); printf(\n\tdev,nodev,nouser_xattr,netbiosname=OUR_RFC1001NAME,hard,soft,intr,); - printf(\n\tnointr,ignorecase,noposixpaths,noacl); + printf(\n\tnointr,ignorecase,noposixpaths,noacl,prefixpath=path,nobrl); + printf(\n\tin6_addr); printf(\n\nOptions are described in more detail in the manual page); printf(\n\tman 8 mount.cifs\n); printf(\nTo display the version number of the mount helper:); -- Samba Shared Repository
[Samba] Re: Bug in kernel-space samba client (3.0.23a) on FC5
I cannot access multiple samba shares that have share-level security using cifs. Looks like a likely bug, could you open a bugzilla bug in bugzilla.samba.org against component CifsVFS so we can track this and I will work on it in the next few days. Thanks, -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Re: CIFS, fstab, credentials
I will take a look at the credential files parsing and make sure it works with the version of mount.cifs built on the web site and the version built from source in samba cvs. I don't recognize the other problem with early mount soon after boot failing with rc=22 (presumably EINVAL invalid parameter). On Sun, 2004-03-07 at 09:05, Dexter Filmore wrote: Hi, I just installed CIFS support on my machines and must say it works much better than smbfs. special characters alright, transfer speed doubled (from 2.8MB/s to 5.6MB/s on 100MBit). There's two issues tho I haven't been able to root out: -credentials file: tried username=username and password=password in /etc/credfile, tried user=username to match the convention in cifsfs, but with both variants I get: mount error 13 = Permission denied Refer to the mount.cifs(8) manual page (e.g.man mount.cifs) the corresponding fstab entry is: //xerxes/m1 /mnt/xerxes/d cifs credentials=/etc/credfile,uid=dexter,gid=users,rw 0 0 The other thing is: at boot time, I get: CIFS VFS: Error connecting to IPv4 socket. Aborting operation CIFS VFS: cifs_mount failed w/return code = -22 later, when the system is up, I can cd to the mnt dir and mount alright, with mount mntpoint, not mount -t -o options (works as well, but isn't necessary, mount.cifs parses fstab properly as opposed to at boot time. As long as I put user and password in fstab in plain text, that is, else I get: CIFS: Unknown mount option credentials I will try moving /proc above cifs entries in fstab and see if that help. Both machines run Slackware Linux 9.1/current, Linux 2.6.3, Samba 3.0.2a, mount.cifs version 1.1. Dex -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] CIFS howto?
Is there a CIFS howto? is cifs-vfs standalone or a supplement to Samba? CIFS VFS is a Linux kernel component (can be compiled as a module cifs.o) which provides a more functional alternative to the smbfs client for accessing Windows 2000 and later and Samba or equivalent SMB/CIFS servers which also provides file semantics that are much more Unix/Linux friendly (POSIX-like file API behavior). The project page http://us1.samba.org/samba/Linux_CIFS_client.html includes more information about it but has not been udpated to note progress of the past month or so. The fs/cifs/README file at http://cvs.samba.org/cgi-bin/cvsweb/cifsvfs/fs/cifs/README?rev=1.20content-type=text/x-cvsweb-markup contains howto instructions for its use and there is some information that has been posted to mailing lists about which cases in which smbfs must still be used instead of cifs vfs even in 2.6 but generally the older smbfs must be used instead of cifs vfs if 1) access to NT4 or Win98 servers is required or 2) the kernel is 2.4 and detailed errors on mount need to be reported or 3)you are using most current smbfs and most current smbmnt/smbmount from Samba 3.0 and you require the use of Kerberos or NTLMv2 cifs vfs is typically used in cases in which: 1) Windows 2003 is the server or smb/cifs packet signing (a useful security feature) is required or 2) the servers are relatively newer (Windows 2000 or later, or Samba 2.2.7 or later) or 3) POSIX like semantics (e.g. deleting or renaming open or read-only files) are desired or 4)The kernel is 2.6 and you need better network file read/write performance or 5) better internationalization is needed (Unicode) or 6) safe caching (oplock) is needed for network data integrity For Linux 2.6, cifs vfs is included in the standard kernel, for 2.4 based kernels it depends on the distribution whether the module is included or not (SuSE includes it for example). The CIFS VFS has better performance and function on 2.6 due to enhancements made to the core kernel itself. For both 2.6 and 2.4 versions of the cifs vfs client, I expect to release updates in the next week, probably with version number 1.0.3 that will include very important fixes found during testing over the past two months. The CIFS module does include an optional mount helper (which is especially useful for 2.4) which is recommended to be installed (and found in the Samba 3 CVS tree as called mount.cifs.c) smbfs, although it has received less attention over the last year, does include more function in its 2.6 version than its 2.4 version as well and smbfs is still required for accessing older NT4 servers and Windows 98 servers, and on 2.4 Linux kernels is reasonably well tested. The two kernel modules (cifs.o and smbfs.o) can coexist but over time I plan to add enough function to make cifs.o be able to at least handle the NT4 server case which will lessen the need for smbfs in some of those environments. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba