Index | Thread | Search

From:
Evan Silberman <evan@jklol.net>
Subject:
Re: login.conf.5: document "infinity" value in size type
To:
Sebastien Marie <semarie@kapouay.eu.org>
Cc:
tech@openbsd.org, landry@openbsd.org
Date:
Fri, 24 Jan 2025 23:02:04 -0800

Download raw body.

Thread
Sebastien Marie <semarie@kapouay.eu.org> wrote:
> Hi,
> 
> landry@ reported recently that login.conf(5) man page missed to document
> "infinity" value for fields like "datasize-cur".
> 
> After looking at code in lib/libc/gen/login_cap.c (specially
> login_getcapsize() and strtolimit() functions), valid "infinity" values
> are:
> - infinity
> - inf
> 
> The following diff adds a sentence to "size" argument type description,
> to mention the both keywords.
> 
> I reused the wording in getrlimit(2).
> 
> 
> diff --git a/share/man/man5/login.conf.5 b/share/man/man5/login.conf.5
> index 3d6d92a14c..dbbfb2b5da 100644
> --- a/share/man/man5/login.conf.5
> +++ b/share/man/man5/login.conf.5
> @@ -413,6 +413,10 @@
>  .Li t
>  to indicate that the value is in 512-byte blocks,
>  kilobytes, megabytes, gigabytes, or terabytes, respectively.
> +.Ql infinity
> +or
> +.Ql inf
> +is considered as infinite value for a limit.
>  .\"
>  .It time
>  A time in seconds.
> 
> 
> Comments or OK ?

This reads awkwardly. I'd rewrite the whole thing as:

.It size
A number which expresses a size limit, or
.Ql infinity
for no limit.
By default, the size is specified in bytes.
It may have a trailing
.Li b ,
.Li k ,
.Li m ,
.Li g
or
.Li t
to indicate that the value is in 512-byte blocks,
kilobytes, megabytes, gigabytes, or terabytes, respectively.