From owner-freebsd-bugs Sat Jan 12 6:40:14 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 34ABC37B416 for ; Sat, 12 Jan 2002 06:40:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0CEe5a85470; Sat, 12 Jan 2002 06:40:05 -0800 (PST) (envelope-from gnats) Date: Sat, 12 Jan 2002 06:40:05 -0800 (PST) Message-Id: <200201121440.g0CEe5a85470@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: David Malone Subject: Re: bin/33809: mount_nfs has trouble with embedded ':' in path Reply-To: David Malone Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/33809; it has been noted by GNATS. From: David Malone To: aaron Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/33809: mount_nfs has trouble with embedded ':' in path Date: Sat, 12 Jan 2002 14:37:34 +0000 On Sat, Jan 12, 2002 at 12:18:55PM +0100, aaron wrote: > When taking a look at /usr/src/sbin/mount_nfs/ \ > mount_nfs.c the problem seems to be at line 593: > > [ function: getnfsargs() ] > if ((delimp = strrchr(spec, ':')) != NULL) { > ^^^^^^^^^^ this gives a '\:' no chance. > Neither does it take into account that I might have specified > the path enclosed with single quotes "'" (e.g. > mount_nfs hostname.com:'/my/path:rest/' /mnt If you put quotes or escape the colon on the command line, then this will have been interpreted by your shell before mount_nfs is run and so mount_nfs does not have to understand this. The reason the last ':' is used is probably so that IPv6 addresses can be used with mount_nfs (this would work in -current, but probably not on stable). I'm not sure what the best way to resolve this is - it may be "don't use paths with colons in them". Another possibility would be to add an extra flag to mount_nfs which lets you give the host name/address seperately from the path. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message