From owner-freebsd-fs@FreeBSD.ORG Tue Dec 30 21:52:49 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B2C1ABC; Tue, 30 Dec 2014 21:52:49 +0000 (UTC) Received: from mail-pd0-x22b.google.com (mail-pd0-x22b.google.com [IPv6:2607:f8b0:400e:c02::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED69964D58; Tue, 30 Dec 2014 21:52:48 +0000 (UTC) Received: by mail-pd0-f171.google.com with SMTP id y13so19910749pdi.30; Tue, 30 Dec 2014 13:52:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=jrtc7e2v4KZG/PJrExwNiJ+qI2cCTkzJno9a7m5rLzw=; b=PDECIIYByH1ri1iFtadYoVoJ88pT9dd92xHcR6gIhIwQmPPvCGUaqyLwK3gsnB3eRn AJ4xC/HlFFLnbp22/ZT+kcrHV92mLtFTCHaNBnUxQE6ttFkdgbU27M6dJGuVWJfT2/T1 6cksmUqa1CNBa9+dY5NLpkcrscJKzBFSG4dJuW05TiVPcplRbeDh1AMZkeL1jNolTN4c b4ikGy3Lsq0TBJgmJzMWB3h7FK4A/lXt3nT+c587gODMqpzKczNX/oreSUZl2zBvv6o5 F43RsZcZ98lQup8TtlGzT2Gv9KZZTXJcVW9xZi154iDSE2CknekD8i3lcazUF43VxvK0 XQvg== MIME-Version: 1.0 X-Received: by 10.70.37.4 with SMTP id u4mr64238655pdj.40.1419976368471; Tue, 30 Dec 2014 13:52:48 -0800 (PST) Reply-To: kirk@ba23.org Sender: kirk.j.russell@gmail.com Received: by 10.66.26.193 with HTTP; Tue, 30 Dec 2014 13:52:48 -0800 (PST) In-Reply-To: <20141230020510.GA73120@ns.kevlo.org> References: <20141229053714.GA66793@ns.kevlo.org> <2050662882.3355858.1419863932660.JavaMail.root@uoguelph.ca> <20141230020510.GA73120@ns.kevlo.org> Date: Tue, 30 Dec 2014 16:52:48 -0500 X-Google-Sender-Auth: DafnCSwB57I6d52dajy3k-7nlFA Message-ID: Subject: Re: help using mount_smbfs with apple time capsule server From: kirk russell To: Kevin Lo Content-Type: text/plain; charset=UTF-8 Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2014 21:52:49 -0000 On 29 December 2014 at 21:05, Kevin Lo wrote: > On Mon, Dec 29, 2014 at 09:38:52AM -0500, Rick Macklem wrote: >> >> Kevin Lo wrote: >> > On Sun, Dec 28, 2014 at 06:12:07PM -0500, Rick Macklem wrote: >> > > >> > > Kirk Russell wrote: >> > > > Hi, >> > > > >> > > > I cannot get FreeBSD 10's smbfs client to work with my server -- >> > > > an >> > > > Apple time >> > > > capsule 4th generation version 7.6.4. >> > > > >> > > > Here are the commands I ran, to reproduce the issue: >> > > > # uname -a >> > > > FreeBSD 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 >> > > > 21:02:49 UTC 2014 >> > > > root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >> > > > # mount_smbfs -R 16 //lamb@Meganium/Data /mnt >> > > > Password: >> > > > # dd if=/mnt/afile bs=1 count=1 of=/dev/null >> > > > dd: /mnt/afile: No such file or directory >> > >> > Are you sure the file "afile" really exists? I checked again, and the file "afile" exists on the server. Using FreeBSD 10, 'ls /mnt' comes back as empty. If there is more debugging that I can do from here, please let me know. >> > >> > > > For the FreeBSD 10 session, I tried to capture the raw packets, >> > > > using >> > > > tcpdump, >> > > > in file bad.tcpdump. >> > > > >> > > > >> > > > This works with FreeBSD 9. For this working session, I tried to >> > > > capture the >> > > > raw packets, using tcpdump, in file good.tcpdump. >> > > > >> > > > # uname -a >> > > > FreeBSD 9.3-STABLE FreeBSD 9.3-STABLE #0: Wed Dec 24 16:16:05 >> > > > EST >> > > > 2014 kirk@freenas:/usr/obj/usr/src/sys/GENERIC amd64 >> > > > # mount_smbfs -R 16 //lamb@Meganium/Data /mnt >> > > > Password: >> > > > # dd if=/mnt/afile bs=1 count=1 of=/dev/null >> > > > 1+0 records in >> > > > 1+0 records out >> > > > 1 bytes transferred in 0.000345 secs (2899 bytes/sec) >> > > > >> > > > >> > > > The two raw packets dumps are in this archive: >> > > > http://www.employees.org/~kirk/bstgbugs/smbfs.tar.gz >> > > > >> > > > Any pointers how to get his working? >> > > > The server appears to be returning an ERRbadpath error. >> > > > >> > > Well, my guess is that it has something to do with the Unicode >> > > changes added to smbfs about three years ago by kevlo@ (r227650 >> > > and friends in head). These changes are not in FreeBSD9. >> > >> > Hmm, it was MFC'ed to stable/9 (r230196). >> > >> Oops, my mistake. When I looked at svnweb, I saw the first log >> entry for smbfs_subr.c listing "MFC: r228796", but didn't notice >> the second "MFC: r227650" and thought it hadn't been MFC'd. > > No worries :-) > >> All I can tell you is that wireshark shows "\file" for the good.tcpdump >> vs "\\afile" for bad.tcpdump, so I guessed that was why the Mac didn't >> find it? > > I don't have machines running samba on OS X, I'll try to borrow my > colleague's laptop and test it out, thanks. The SMB/CIFS server is one of these kinda boxes: http://en.wikipedia.org/wiki/AirPort_Time_Capsule > >> I'll leave now, since I know nothing about SMB, rick >> >> > > It appears that it now sends "\\afile" instead of "\afile" and >> > > I know nothing about the code/protocol but r227650 added changes >> > > like: >> > > error = mb_put_uint8(mbp, '\\'); >> > > replaced with: >> > > if (SMB_UNICODE_STRINGS(vcp)) >> > > error = mb_put_uint16le(mbp, '\\') >> > > else >> > > error = mb_put_uint8(mbp, '\\'); >> > > Note that the '\\' is actually 4 \ characters. >> > > >> > > Hopefully someone knows enough about Unicode or how SMB >> > > uses it to make sense of this? >> > >> > I tested it under FreeBSD -current [1] and and 9.3-STABLE [2], >> > it works perfectly... >> > >> > [1] >> > ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-amd64-20141222-r276066-memstick.img >> > >> > [2] >> > ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/9.3/FreeBSD-9.3-STABLE-amd64-20141222-r276041-memstick.img >> > >> > > rick >> > > >> > > > -- >> > > > Kirk Russell >> > > > http://www.ba23.org/ >> > > > Kevin -- Kirk Russell http://www.ba23.org/