From owner-freebsd-fs Sun Mar 16 23:43:47 2003 Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D65537B401; Sun, 16 Mar 2003 23:43:45 -0800 (PST) Received: from mail-out1.apple.com (mail-out1.apple.com [17.254.0.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id C04EA43FAF; Sun, 16 Mar 2003 23:43:44 -0800 (PST) (envelope-from conrad@apple.com) Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out1.apple.com (8.12.8/8.12.8) with ESMTP id h2H7hiOr004602; Sun, 16 Mar 2003 23:43:44 -0800 (PST) Received: from scv1.apple.com (scv1.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id ; Sun, 16 Mar 2003 23:43:39 -0800 Received: from apple.com (minshallidsl3.apple.com [17.219.180.28]) by scv1.apple.com (8.11.3/8.11.3) with ESMTP id h2H7hh619506; Sun, 16 Mar 2003 23:43:43 -0800 (PST) Date: Sun, 16 Mar 2003 23:43:44 -0800 Subject: Re: mount_smbfs in FreeBSD-STABLE Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v551) Cc: Conrad Minshall To: Andrew Reilly , Boris Popov , fs@FreeBSD.ORG From: Conrad Minshall In-Reply-To: <1047872758.78456.29.camel@gurney.reilly.home> Message-Id: <2E513E7C-584C-11D7-8BB2-000A95757E40@apple.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.551) Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org For item 1)... the SMB URL definition allows %nn escapes, as usual. So if the FreeBSD version of mount_smbfs supports it, you can specify spaces with a "%20". If it doesn't support it, you might drop an "unpercent" function into mount_smbfs. Here's such a function... "Darwin" has more source code context if it is needed... /* * Removes the "%" escape sequences from a URL component. * See IETF RFC 2396. */ char * unpercent(char * component) { unsigned char c, *s; unsigned hi, lo; if (component) for (s = component; (c = *s); s++) { if (c != '%') continue; if ((hi = xtoi(s[1])) > 15 || (lo = xtoi(s[2])) > 15) continue; /* ignore invalid escapes */ s[0] = hi*16 + lo; /* * This was strcpy(s + 1, s + 3); * But nowadays leftward overlapping copies are * officially undefined in C. Ours seems to * work or not depending upon alignment. */ memmove(s+1, s+3, strlen(s+3) + 1); } return (component); } On Sunday, March 16, 2003, at 07:45 PM, Andrew Reilly wrote: > Hi Boris, > > Firstly, enormous thanks for getting mount_smbfs going in the first > place: it's tremendously useful. > > I have three questions, though, two of which may not be the domain of > mount_smbfs at all: > > 1) Is it possible to use fstab for smbfs mounts when the name of the > filesystem to be mounted contains a space? I haven't figured out how > to > escape a space there, yet. > > 2) Is it possible to use amd or something similar to auto-mount > smbfs/cifs file systems? > > 3) Is it possible to have mount_smbfs authenticate with a windows > domain > login, rather than a workgrop login? > > Thanks in advance, > > -- > Andrew Reilly > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-fs" in the body of the message > > -- Conrad Minshall conrad@apple.com 408-446-2323 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message