Hello,
I've developing some own jail management solution based on naming jail as a
number in hexadecimal form.
On a half way I encountered an error with digit only jail name (in my case -
47777). Discussion via hackers@ reveal that despite the error itself kernel
part of a jail would treat numeric name as a JID and nothing can be done with
it.
It's a very disappointing because jail(8) contain nothing about numeric only
case:
name The jail name. This is an arbitrary string that identifies a
jail (except it may not contain a ďż˝.ďż˝).
May be there is a way to solve the problem?
for reference:
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.
--
Best regards,
Anthony Pankov mailto:[email protected]