From owner-freebsd-fs@FreeBSD.ORG Mon Dec 29 05:39:22 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 263AB14E for ; Mon, 29 Dec 2014 05:39:22 +0000 (UTC) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 90BB16B2 for ; Mon, 29 Dec 2014 05:39:19 +0000 (UTC) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.9/8.14.9) with ESMTP id sBT5bGRm066804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 29 Dec 2014 13:37:16 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.9/8.14.9/Submit) id sBT5bEE8066803; Mon, 29 Dec 2014 13:37:15 +0800 (CST) (envelope-from kevlo) Date: Mon, 29 Dec 2014 13:37:14 +0800 From: Kevin Lo To: Rick Macklem Subject: Re: help using mount_smbfs with apple time capsule server Message-ID: <20141229053714.GA66793@ns.kevlo.org> References: <1027320326.3203438.1419808327617.JavaMail.root@uoguelph.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1027320326.3203438.1419808327617.JavaMail.root@uoguelph.ca> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-fs@freebsd.org, kirk@ba23.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: Mon, 29 Dec 2014 05:39:22 -0000 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? > > 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). > 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