From owner-freebsd-jail@FreeBSD.ORG Mon Jul 12 07:54:28 2010 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47F26106564A for ; Mon, 12 Jul 2010 07:54:28 +0000 (UTC) (envelope-from mlmichael70@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id C9CE18FC1B for ; Mon, 12 Jul 2010 07:54:27 +0000 (UTC) Received: by bwz12 with SMTP id 12so2641240bwz.13 for ; Mon, 12 Jul 2010 00:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=9kSDo0fnAy1/jkAF1nK3CZIe0rB+xYCCd/6SHAA+WPE=; b=fAbPgPCRYb5zeOB0EV3j/6pNYMFZWTkUN6+3qpe5Cp1zlq2esN3O7Ze9HaVlAbJGT9 J7YxKigt5MkByzx2y/tOEeNO8BTKw+Y2f7XlqfjbxtxZyXnCqt55ngyQSMeL7BDnvDd+ m1yrFvhYbLHLRHVsEJk7FyaoTg8wD02Ao5t7E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=TkyrBBe3sWGlQEloFTj/DUqLlsKCOSnQb9Gu92KFVZNuhWYobYE0du4SraKPqClcy+ Lnvjrxv7TdU3tCSddgmlHCqjV1h7lwJ5vBex3pQ98fVGSLEHPa3gsfFXzlxEsL7qpnR8 KQjoybeWYc4t/8O5LrMHkTguasle+1PandFuE= Received: by 10.204.134.156 with SMTP id j28mr10400779bkt.10.1278919519864; Mon, 12 Jul 2010 00:25:19 -0700 (PDT) Received: from prime.local (94-193-57-116.zone7.bethere.co.uk [94.193.57.116]) by mx.google.com with ESMTPS id a11sm13910789bkc.12.2010.07.12.00.25.19 (version=SSLv3 cipher=RC4-MD5); Mon, 12 Jul 2010 00:25:19 -0700 (PDT) Message-ID: <4C3AC360.4090507@gmail.com> Date: Mon, 12 Jul 2010 08:25:20 +0100 From: Michael User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.10) Gecko/20100628 Thunderbird/3.0.5 MIME-Version: 1.0 To: freebsd-jail@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: jails on loopback and ipfw nat - is it possible? X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 07:54:28 -0000 Hello. Did anybody managed to get jails aliased on loopback interface to work with ipfw nat? I'm struggling with this problem for quite some time now and I started wondering if it's possible at all. I know it's easy peasy with pf but on this particular system I need ipfw. Michael From owner-freebsd-jail@FreeBSD.ORG Mon Jul 12 11:07:03 2010 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DAFA1065673 for ; Mon, 12 Jul 2010 11:07:03 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 03C128FC37 for ; Mon, 12 Jul 2010 11:07:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o6CB729T094048 for ; Mon, 12 Jul 2010 11:07:02 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o6CB72TR094046 for freebsd-jail@FreeBSD.org; Mon, 12 Jul 2010 11:07:02 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 12 Jul 2010 11:07:02 GMT Message-Id: <201007121107.o6CB72TR094046@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-jail@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-jail@FreeBSD.org X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 11:07:03 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/147162 jail [jail] [panic] Page Fault / Kernel panic when jail sta s conf/142972 jail [jail] [patch] Support JAILv2 and vnet in rc.d/jail o conf/141317 jail [patch] uncorrect jail stop in /etc/rc.d/jail o kern/133265 jail [jail] is there a solution how to run nfs client in ja o kern/119842 jail [smbfs] [jail] "Bad address" with smbfs inside a jail o bin/99566 jail [jail] [patch] fstat(1) according to specified jid o bin/32828 jail [jail] w(1) incorrectly handles stale utmp slots with 7 problems total. From owner-freebsd-jail@FreeBSD.ORG Thu Jul 15 19:13:56 2010 Return-Path: Delivered-To: jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A58CA1065675 for ; Thu, 15 Jul 2010 19:13:56 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from gritton.org (gritton.org [208.92.232.93]) by mx1.freebsd.org (Postfix) with ESMTP id 602488FC15 for ; Thu, 15 Jul 2010 19:13:56 +0000 (UTC) Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by gritton.org (8.14.3/8.14.3) with ESMTP id o6FJDs0r044157; Thu, 15 Jul 2010 13:13:55 -0600 (MDT) (envelope-from jamie@FreeBSD.org) Message-ID: <4C3F5D51.6000903@FreeBSD.org> Date: Thu, 15 Jul 2010 13:11:13 -0600 From: Jamie Gritton User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.5) Gecko/20100103 Thunderbird/3.0 MIME-Version: 1.0 To: Stanislav Uzunchev References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: jail@FreeBSD.org, hackers@FreeBSD.org Subject: Re: libjail issues. X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 19:13:56 -0000 On 07/15/10 04:12, Stanislav Uzunchev wrote: > 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. That's a bug in jail_getv, which I'm committing the fix for now. Unfortunately, it's too late to get it in the 8.1 release, but it will at least be in future releases. The issue is that jail_getv wrongly allocated temporary space based on the length of the parameters passed in, which don't even have values yet. The different array sizes in your sample code would coincidentally locate the "buff" array with different garbage contents, leading to different behavior with the bug. > 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 *). You don't value to set jp_value directly, but use the jailparam_import function. That will set jp_value correctly based on the parameter's type. - Jamie