Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jul 2010 13:12:27 +0300
From:      Stanislav Uzunchev <uzunchev.stanislav@gmail.com>
To:        hackers@freebsd.org
Subject:   libjail issues.
Message-ID:  <AANLkTilD-_sjxHkIrbgmQtUhxq0Dtj_JWrOWuurZW1tb@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi, all.
 I have found something very strange to me... It is a problem with static
allocating size of buffer where jail param is going to be coppied, using
jail_getv function from the libjails. Well for example:

buff[size];
jail_getv(0, "name", "1", "host.hostname", buff, NULL);

the result for size = 64; is bsnmp.test, size = 257; is bsnmp.test, size =
256; is bs1 ?

#sysctl -a | grep "security.jail.param.host.hostname:"
256

#jls
JID Hostname
1     bsnmp.test

#jls -n | grep "bs1"
returns no match.

This is really confusing me.

Also i will take suggestions, what is the best way, to get and set all
value/params using the jailparam struct.
I am trying first to set the name or jid, and after that getting the values
for the rest parameters with jail_getv, but i face some problems setting
jp_value since it is type (void *).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTilD-_sjxHkIrbgmQtUhxq0Dtj_JWrOWuurZW1tb>