From owner-freebsd-geom@FreeBSD.ORG Mon Mar 15 20:43:23 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 488D3106566B for ; Mon, 15 Mar 2010 20:43:23 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 03A5A8FC0C for ; Mon, 15 Mar 2010 20:43:22 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NrH8C-0007Mq-Iu for freebsd-geom@freebsd.org; Mon, 15 Mar 2010 21:43:20 +0100 Received: from 93-138-83-214.adsl.net.t-com.hr ([93.138.83.214]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Mar 2010 21:43:20 +0100 Received: from ivoras by 93-138-83-214.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Mar 2010 21:43:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Ivan Voras Date: Mon, 15 Mar 2010 21:43:07 +0100 Lines: 44 Message-ID: References: <20100315195059.GA1331@a91-153-117-195.elisa-laajakaista.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 93-138-83-214.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.21 (X11/20090612) In-Reply-To: <20100315195059.GA1331@a91-153-117-195.elisa-laajakaista.fi> Subject: Re: geom_label and directories under /dev X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2010 20:43:23 -0000 Jaakko Heinonen wrote: > Hi, > > I was working to fix problems with GEOM label class allowing some > problematic label names which can't represent proper files under /dev. > For example: > > - empty label > - "." and ".." > - labels starting or ending with '/' > - labels ending with /.. (Due to a bug for example /..foo/.. is > allowed.) Also, encoding needs to be adjusted in some cases (e.g. NTFS, FAT32?). The only sane choices are 7-bit ASCII or UTF-8. Also, kern.geom.confxml needs to escape or strip XML-special characters... > Then I noticed that directories are also problematic. Here's how to > panic your system: > > # glabel create ab ad0 > # glabel create ab/cd ad0 > # ls -l /dev/label > > I was going to suggest disallowing of '/' in labels but in past such > change has been reverted. > > ------------------------------------------------------------------------ > r149339 | pjd | 2005-08-20 20:05:47 +0300 (Sat, 20 Aug 2005) | 5 lines > > Back-out the change from revision 1.14 and allow for '/' in labels > again. > > Convinced by: green, Gavin Atkinson, dougb, gordon > MFC after: 1 day > > ------------------------------------------------------------------------ > > So it's probably a dead end to try to suggest disallowing of '/'? > Unfortunately it's not easy to fix all problems with directories. For > starters devfs doesn't support removal of directories at all. I have no idea why "/" would be allowed - it isn't in regular filenames so why would this be special? I wote to remove slashes.