From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 15 10:43:50 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59498106566C for ; Thu, 15 Jul 2010 10:43:50 +0000 (UTC) (envelope-from uzunchev.stanislav@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id E199C8FC16 for ; Thu, 15 Jul 2010 10:43:49 +0000 (UTC) Received: by mail-fx0-f54.google.com with SMTP id 13so337354fxm.13 for ; Thu, 15 Jul 2010 03:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=zWF2bXZkXJ3XLJp1mhKih08qmy++LTYrHlXkuJ5ctVM=; b=wPGqlRYOnUNfNBumpR4yvUCWClaTSj3uhNZfo+qUM2aVmVcZuz++rwSTRmaw8uJSOG /C1RSRX7P8OUKV+NO/+su+A/IWfXV/0VTkZjuRbgacksEWhbIfaCe91tB9CVrbd9CWaY uoq290lXnvib7vQIwESM5tC+xzhdIDjrOcWTw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=bCXzKAQ94nV+iSmuPolXkEdL0OTXMuyBhKI8wwXG71wSboiGshBnog5d4nuirKP9xC PTFHndpDKwiT9ZBti3wOaIaHRh5+3OYeUbgFL2Fcea6f8AbKqUCBgXl206OKEq9/au44 Mkn0/p7gyhv83DBc0HW9vjOqBrnz4VyJyuUTQ= MIME-Version: 1.0 Received: by 10.103.240.8 with SMTP id s8mr3024491mur.78.1279188747278; Thu, 15 Jul 2010 03:12:27 -0700 (PDT) Received: by 10.103.170.15 with HTTP; Thu, 15 Jul 2010 03:12:27 -0700 (PDT) Date: Thu, 15 Jul 2010 13:12:27 +0300 Message-ID: From: Stanislav Uzunchev To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: libjail issues. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 10:43:50 -0000 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 *).