sizeof jail parameter value strings
Fabian Freyer
fabian.freyer at physik.tu-berlin.de
Thu May 17 17:52:38 UTC 2018
Hello lists,
From jail(3):
> The jail_getv() function takes a null-terminated list of name and value
> strings, and passes it to jail_get(2). It is the caller's responsibility
> to ensure that the value strings point to buffers large enough to hold
> the string representation of the returned parameters.
What exactly does “large enough” mean here? Is there a way to query the size of
the corresponding kernel buffers at runtime? Is there a maximum length à la
MAX_JAIL_PARAM_LEN that the string representations of the returned parameters
are guaranteed to be shorter than?
I’m currently implementing a rust wrapper[1] around the jail(2) interface, and am
not sure how large buffers for the string parameters I’m querying with jail_get
jail_set have to be.
Fabian
(I’m not on the freebsd-jail mailing list, so I’d appreciate being kept in the CC)
[1] https://github.com/fubarnetes/libjail-rs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 882 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20180517/fdf5e2f9/attachment.sig>
More information about the freebsd-hackers
mailing list