From owner-freebsd-bugs@freebsd.org Thu Dec 10 19:19:30 2015 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A9A79D666F for ; Thu, 10 Dec 2015 19:19:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2891919A9 for ; Thu, 10 Dec 2015 19:19:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id tBAJJUfW036200 for ; Thu, 10 Dec 2015 19:19:30 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 204897] [jail] Jail names cannot start with a '0', resulting in 'jail: name cannot be numeric (unless it is the jid)' Date: Thu, 10 Dec 2015 19:19:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-RELEASE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jamie@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: jamie@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.isobsolete bug_status cc assigned_to attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2015 19:19:30 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204897 Jamie Gritton changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163656|0 |1 is obsolete| | Status|New |Open CC| |jamie@FreeBSD.org Assignee|freebsd-bugs@FreeBSD.org |jamie@FreeBSD.org --- Comment #1 from Jamie Gritton --- Created attachment 164084 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=164084&action=edit check for non-numeric or canonical jid I'm trying to remember a few years back, but I think the reason I checked for namelc[0] == '0' is to weed out leading zeroes (since the "!= jid" test will already catch a name of "0"). That was clearly not done right. This patch will allow any name that's not fully numeric, such as your "0day" example, also the jid in normal form (no leading zero, space, '+'), but no other fully numeric names. I'll submit it shortly unless anyone sees some problem. -- You are receiving this mail because: You are the assignee for the bug.