Re: does numeric only name of jails not allowed (bug?)

From: James Gritton <jamie_at_freebsd.org>
Date: Sun, 10 Aug 2025 04:47:48 UTC
On 2025-08-09 04:01, Anthony Pankov wrote:
>> This is an artifact of how numeric names work.  When you use a purely 
>> numeric name, it's taken as both the jid and the name.  jail(8) has 
>> some logic up-front that will set one or the other variable based on 
>> the name, but it omits the other.
> 
> I think to prevent ambiguity there must be a possibility or requirement 
> to quote jail name to force interpretation as a string.
> Using "47777" instead of 47777 doesn't help for now.

That's fine for user space.  But in the kernel, you still have a numeric 
name, and that's only allowed if the name is the same as the jid.  The 
work to make the $jid and $name parameters available to jail(8) is good, 
but that's separate from the kernel level.

>> When you use a purely numeric name, it's taken as both the jid
> I've never hear about this feature. But I'm in doubt how to guarantee 
> jail startup with jid=name=10 along system functioning. If non-numeric 
> jail occupied jid 10 then jail 10  will not start?

Right - so a jail called "10" cannot be created with a jid other than 
10, and it also can't be create with a jid of 10 because that already 
exists.

- Jamie