From owner-freebsd-jail@FreeBSD.ORG Mon Oct 1 11:07:21 2012 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 0481E106566B for ; Mon, 1 Oct 2012 11:07:21 +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 E255A8FC1A for ; Mon, 1 Oct 2012 11:07:20 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q91B7Kf3025010 for ; Mon, 1 Oct 2012 11:07:20 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q91B7Ks5025008 for freebsd-jail@FreeBSD.org; Mon, 1 Oct 2012 11:07:20 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 1 Oct 2012 11:07:20 GMT Message-Id: <201210011107.q91B7Ks5025008@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, 01 Oct 2012 11:07:21 -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/169751 jail [jail] reading routing information does not work in ja o bin/167911 jail new jail(8) problem with removal, ifconfg -alias and k o kern/159918 jail [jail] inter-jail communication failure o kern/156111 jail [jail] procstat -b not supported in jail o misc/155765 jail [patch] `buildworld' does not honors WITHOUT_JAIL o conf/154246 jail [jail] [patch] Bad symlink created if devfs mount poin o conf/149050 jail [jail] rcorder ``nojail'' too coarse for Jail+VNET 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 13 problems total. From owner-freebsd-jail@FreeBSD.ORG Fri Oct 5 15:22:49 2012 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 686F41065670 for ; Fri, 5 Oct 2012 15:22:49 +0000 (UTC) (envelope-from joris.dedieu@gmail.com) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id 23E508FC0C for ; Fri, 5 Oct 2012 15:22:48 +0000 (UTC) Received: by mail-qa0-f47.google.com with SMTP id i29so425354qaf.13 for ; Fri, 05 Oct 2012 08:22:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=4SyiHTs66mCQrL0SGJRQ9LpV0mzGh42nIz5hdy2X3G8=; b=TI8VZXMe0FVmo7HueygwA6hQXW9lylKEZfayghOyX7298OHyZfG7p4vT0SQ/80p21P AsAQKqOOXc3MtTfBQSkl8sgHvxEdLskvMtYnkFOM05ORoNOzuxcu/UejOKMsK1U5gj88 WTs9hMVIdwDcvoPEYf6ERwOozjH1f3wRljdU2zfNYknHLNDkdicdfPw7qWbD2dJTtURX 2dg6ODSSbz8RkSu9cFpgxOvO/HON2HhwyecIY1O++6VPwqQ9hErz9u315tJR46fVAmvl CHuNfgdX/B+ZzAKh7gjMGr0mVYjFHk7Mb2c+5qdVGmhlFUwb9siVnpRW0y5/n8SZP7dI sC/Q== MIME-Version: 1.0 Received: by 10.49.130.70 with SMTP id oc6mr25622790qeb.16.1349450568497; Fri, 05 Oct 2012 08:22:48 -0700 (PDT) Received: by 10.224.136.151 with HTTP; Fri, 5 Oct 2012 08:22:48 -0700 (PDT) Date: Fri, 5 Oct 2012 17:22:48 +0200 Message-ID: From: joris dedieu To: freebsd-jail@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: create an empty jail with libjail 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: Fri, 05 Oct 2012 15:22:49 -0000 Hi, I try to create an empty jail using libjail. Something equivalent to "jail -c name=empty host.hostname=empty path=/var/empty persist". I've tried with jailparam_import and jail_setv on 8.3 and 9.1 but both failed. I can't find where my code is wrong. Eg 1: #include #include #include int main(int argc, char **argv) { struct jailparam params[4]; int jid; jailparam_init(¶ms[0], "name"); jailparam_import(¶ms[0], "empty"); jailparam_init(¶ms[1], "host.hostname"); jailparam_import(¶ms[1], "empty.rmdir.fr"); jailparam_init(¶ms[2], "path"); jailparam_import(¶ms[2], "/var/empty"); /*jailparam_init(¶ms[3], "persist"); jailparam_import(¶ms[3], NULL);*/ if((jid = jailparam_set(params, 4, JAIL_CREATE)) == -1) err(1, "jailparam_set"); printf("jid is %d", jid); return 0; } jailparam_import fails with EINVAL (from libc's jail_set but i don't know why) Eg 2: #include #include #include int main(int argc, char **argv) { int jid; if((jid = jail_setv(JAIL_CREATE, "name", "empty" "host.hostname", "empty", "path", "/var/empty", "persist", NULL, NULL )) == -1) err(1, "jail_setv"); printf("jid is %d", jid); return 0; } jail_setv fails with ENOENT. I think it comes from libjail's jailparam_type as persist is not in security.jail.param's mib in prison 0 (see .lib/libjail/jail.c:854). I really don't understand why it doesn't work. If someone could have a little look, it would be grate. Regards Joris From owner-freebsd-jail@FreeBSD.ORG Fri Oct 5 16:29:41 2012 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE08C1065670 for ; Fri, 5 Oct 2012 16:29:41 +0000 (UTC) (envelope-from joris.dedieu@gmail.com) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id 615498FC1F for ; Fri, 5 Oct 2012 16:29:40 +0000 (UTC) Received: by mail-qa0-f47.google.com with SMTP id i29so507565qaf.13 for ; Fri, 05 Oct 2012 09:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=McwHoYQhx9qYbp+wsVIml1lOMwD22Q1noPdynU3PUn8=; b=t8q1GEeoPFm+EGHbs0UoThjaEp18p13wEvxEH5lJ/Yqyz9OGIg0rGdgIcYx8cWrUCI s4k/EtkepGmQG8B0dY3lqhgKsXKkmPCEAWqH+/AY9GLuR2cSsTTR4o12a3jognSEbdEF kPybsFVex0FbctWTUXksf3DTm+wMTEd5B50BQAxvJsDbwN1k5RyP+Mm/54RHHmk0ZqBV +OgJ0vaiHlIrAPKPGSYLvxHFjSshwz0h85PG+7rO92JwZ+WZylpoEwAi3aMicjkXKWwL 9oVIwIHJl2DmR0P7KSATTqo2NY3YdUqacyau7wcGKrpJKul8CirA1+amG8b5BytF31xz yR3g== MIME-Version: 1.0 Received: by 10.224.200.134 with SMTP id ew6mr17397639qab.54.1349454579397; Fri, 05 Oct 2012 09:29:39 -0700 (PDT) Received: by 10.224.136.151 with HTTP; Fri, 5 Oct 2012 09:29:39 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Oct 2012 18:29:39 +0200 Message-ID: From: joris dedieu To: freebsd-jail@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: create an empty jail with libjail 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: Fri, 05 Oct 2012 16:29:41 -0000 2012/10/5 joris dedieu : > Hi, > I try to create an empty jail using libjail. Something equivalent to > "jail -c name=empty host.hostname=empty path=/var/empty persist". I've > tried with jailparam_import and jail_setv on 8.3 and 9.1 but both > failed. I can't find where my code is wrong. > > Eg 1: > > #include > #include > #include > > int > main(int argc, char **argv) > { > struct jailparam params[4]; > int jid; > jailparam_init(¶ms[0], "name"); > jailparam_import(¶ms[0], "empty"); > jailparam_init(¶ms[1], "host.hostname"); > jailparam_import(¶ms[1], "empty.rmdir.fr"); > jailparam_init(¶ms[2], "path"); > jailparam_import(¶ms[2], "/var/empty"); > /*jailparam_init(¶ms[3], "persist"); > jailparam_import(¶ms[3], NULL);*/ > > if((jid = jailparam_set(params, 4, JAIL_CREATE)) == -1) > err(1, "jailparam_set"); > printf("jid is %d", jid); > return 0; > } The problem with this code (except the comments) was in my world. It works fot me after reinstalling the libc. The second code (with jail_setv, still not working). I will try to find what's wrong with it. Joris > > > jailparam_import fails with EINVAL (from libc's jail_set but i don't > know why) > > > Eg 2: > > #include > #include > #include > > int > main(int argc, char **argv) > { > int jid; > if((jid = jail_setv(JAIL_CREATE, > "name", "empty" > "host.hostname", "empty", > "path", "/var/empty", > "persist", NULL, NULL > )) == -1) > err(1, "jail_setv"); > printf("jid is %d", jid); > return 0; > } > > jail_setv fails with ENOENT. I think it comes from libjail's > jailparam_type as persist is not in security.jail.param's mib in > prison 0 (see .lib/libjail/jail.c:854). > > > I really don't understand why it doesn't work. If someone could have a > little look, it would be grate. > > Regards > Joris From owner-freebsd-jail@FreeBSD.ORG Fri Oct 5 16:40:44 2012 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20DFE1065670 for ; Fri, 5 Oct 2012 16:40:44 +0000 (UTC) (envelope-from joris.dedieu@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id CF4B58FC17 for ; Fri, 5 Oct 2012 16:40:43 +0000 (UTC) Received: by mail-qc0-f182.google.com with SMTP id l39so1504459qcs.13 for ; Fri, 05 Oct 2012 09:40:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=QRUAQWkdeJMZFTyfc9qPekgf7DCceo+sza+yyiZKOSw=; b=PbPiZ4t9p/TvAnc79BvXS40uK0MOxJjQQ/uskcANN/+Mwnc8unWny03oHke3Kk9E9T /cPXDWcPKTC40FIOMtd/U879xxA5qRqDDFYxwdGpMJa+ncDD+klYBCS9E/fgoLN/ci+D 16gxK9nSVL7D3Gkt39pItNZOnP82Aas69VSXmBv2U8tQd4rL5ub7r3HWWMkhWshF2KMV W8TmEJjduAWEs4ZUTTJXbZGUkexARC8agTEekbx+5+k84PfOaFHq6HZ8LfVjHSYpN9Wk lu2OTzuEw9uPEwUXCz2BWQZZwFb+tWxedWpxCb4UZ6V2UgIUt463/ZXl5o7DNilyiIsL jzWw== MIME-Version: 1.0 Received: by 10.49.71.71 with SMTP id s7mr26420437qeu.33.1349455242870; Fri, 05 Oct 2012 09:40:42 -0700 (PDT) Received: by 10.224.136.151 with HTTP; Fri, 5 Oct 2012 09:40:42 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Oct 2012 18:40:42 +0200 Message-ID: From: joris dedieu To: freebsd-jail@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: create an empty jail with libjail 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: Fri, 05 Oct 2012 16:40:44 -0000 2012/10/5 joris dedieu : > 2012/10/5 joris dedieu : >> Hi, >> I try to create an empty jail using libjail. Something equivalent to >> "jail -c name=empty host.hostname=empty path=/var/empty persist". I've >> tried with jailparam_import and jail_setv on 8.3 and 9.1 but both >> failed. I can't find where my code is wrong. Works too after reinstalling libc + fix a typo. Working code : int main(int argc, char **argv) { int jid; if((jid = jail_setv(JAIL_CREATE, "name", "empty", "path", "/var/empty", "host.hostname", "empty", "persist", NULL, )) == -1) err(1, "jail_setv"); printf("jid is %d", jid); return 0; } int main(int argc, char **argv) { struct jailparam params[4]; int jid; jailparam_init(¶ms[0], "name"); jailparam_import(¶ms[0], "empty"); jailparam_init(¶ms[1], "host.hostname"); jailparam_import(¶ms[1], "empty.rmdir.fr"); jailparam_init(¶ms[2], "path"); jailparam_import(¶ms[2], "/var/empty"); jailparam_init(¶ms[3], "persist"); jailparam_import(¶ms[3], NULL); if((jid = jailparam_set(params, 4, JAIL_CREATE)) == -1) err(1, "jailparam_set"); printf("jid is %d", jid); return 0; } Sorry for the noise Joris >> >> Eg 1: >> >> #include >> #include >> #include >> >> int >> main(int argc, char **argv) >> { >> struct jailparam params[4]; >> int jid; >> jailparam_init(¶ms[0], "name"); >> jailparam_import(¶ms[0], "empty"); >> jailparam_init(¶ms[1], "host.hostname"); >> jailparam_import(¶ms[1], "empty.rmdir.fr"); >> jailparam_init(¶ms[2], "path"); >> jailparam_import(¶ms[2], "/var/empty"); >> /*jailparam_init(¶ms[3], "persist"); >> jailparam_import(¶ms[3], NULL);*/ >> >> if((jid = jailparam_set(params, 4, JAIL_CREATE)) == -1) >> err(1, "jailparam_set"); >> printf("jid is %d", jid); >> return 0; >> } > > The problem with this code (except the comments) was in my world. It > works fot me after reinstalling the libc. > The second code (with jail_setv, still not working). I will try to > find what's wrong with it. > > Joris >> >> >> jailparam_import fails with EINVAL (from libc's jail_set but i don't >> know why) >> >> >> Eg 2: >> >> #include >> #include >> #include >> >> int >> main(int argc, char **argv) >> { >> int jid; >> if((jid = jail_setv(JAIL_CREATE, >> "name", "empty" >> "host.hostname", "empty", >> "path", "/var/empty", >> "persist", NULL, NULL >> )) == -1) >> err(1, "jail_setv"); >> printf("jid is %d", jid); >> return 0; >> } >> >> jail_setv fails with ENOENT. I think it comes from libjail's >> jailparam_type as persist is not in security.jail.param's mib in >> prison 0 (see .lib/libjail/jail.c:854). >> >> >> I really don't understand why it doesn't work. If someone could have a >> little look, it would be grate. >> >> Regards >> Joris