From owner-freebsd-questions@freebsd.org Mon Dec 14 20:58:32 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 814764C322E for ; Mon, 14 Dec 2020 20:58:32 +0000 (UTC) (envelope-from mj-mailinglist@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cvtyv3Ptjz3pmV; Mon, 14 Dec 2020 20:58:31 +0000 (UTC) (envelope-from mj-mailinglist@gmx.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607979508; bh=C0FS1b3Kg5dEhYtQ/nIc+/J2d4WM1HsNKMIbFMPBvG8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Uih3fesXyc5vPm1CMQov83ky1ZpIIhVn1UZTSgyoQSwyqJtNDPblJtuZUgKcnELmK hAOCnZK2ciacnbezIVPvjim37TygcPsTSvCddzMWS/2rZDmjGdkl2HB54+JK/XZt+d S6WNPeTKWhkSedw9mhWCyPdB3bAg6m69iukpkqYg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [46.142.163.189] ([46.142.163.189]) by web-mail.gmx.net (3c-app-gmx-bs41.server.lan [172.19.170.93]) (via HTTP); Mon, 14 Dec 2020 21:58:28 +0100 MIME-Version: 1.0 Message-ID: From: mj-mailinglist@gmx.de To: freebsd-questions@freebsd.org Cc: Kyle Evans , jamie@gritton.org Subject: Aw: Re: Questions about the output of jls Content-Type: text/plain; charset=UTF-8 Date: Mon, 14 Dec 2020 21:58:28 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <72165e2885787561bd7fc7384c7b03b8@gritton.org> References: <72165e2885787561bd7fc7384c7b03b8@gritton.org> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:ZcUgPLKfPXJBDKVZR60f8ilnrUKrYiWht6VKPMZUYuZDPB8slfH/b8nI68YtxlP+lIk/I J7Nm/2gjmeqGOEJU/o+mDNSvDMP/gujlhuWIaVVCOuWAn8ICAxGZ4YMh7hB6sPM/sHj2e5tjPene Y1v/fBI7TBn3fU5gurYEbJUwT8fnkRom6SdLCtyvkjuI1IFV9E0hOK4TmbtDBkwkkXCJ7MTq8lgJ a16wkfTfg7nqP+e8rUOkyXJVjy1ER1kTL35GtuEOX087praYTSRsYF8rUFZ6vw+oU0770yEBJ1Bx Vk= X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:hEig3cKE/ww=:SlWFvKfy1dCvbF3qtIiqqQ gaIEfYdbqgdc6gQP948P4xr/kc4Up7bEdKXCbHk1YHrMALTgvR36tM575ogVsw5iRGSm639DL 7kInBlNfExtlGfmgx/n19jdQsCFd6fw4CCpzcsrQhrddFoA26a5YvgsLnmlpXblU77a1xwdJr hcJ6AwueFUQbGmw99ganZp4+W+UGuRer0AmPHGukbhTtRjIWGAFR/cGNXLwFFH0ID9u9dMo8G u5L4+MHuIJNotxQ26dljO5+wfJxnK6gIa/Cb2ztNgXivP3EP8rqHnxKuCzDVuhBacLa43z1b6 07JSgNfNengnP7ND2ouTb7oBW5SNqCAte/jaPe5QFA+ApBVN3ri+kf1PVNUwwIopFRKrI+zkB 2CIcomdzMi3+yYTfDGmDI6PGp+ndrS26Os0P308INdPjUu/MJjbUcoAdJuLvgaUaml6WeomKK 0+KWYXBecHX8tLKD9qTjtZUXlOQuaFs7hEQxve/VvSiGBP9mIFYokjCM8MJwUCDwp8SaX+/AF ChG+A4flyzV2sP7338TkacBtvG3Ak/BUUOlw9YqTvVxaZbPoaGcgP7dtO2sm6Elr2N+q3P7h7 pCBYW8b84NsFw= Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Cvtyv3Ptjz3pmV X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=Uih3fesX; dmarc=pass (policy=none) header.from=gmx.de; spf=pass (mx1.freebsd.org: domain of mj-mailinglist@gmx.de designates 212.227.17.20 as permitted sender) smtp.mailfrom=mj-mailinglist@gmx.de X-Spamd-Result: default: False [-3.60 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmx.de]; R_SPF_ALLOW(-0.20)[+ip4:212.227.17.0/27]; DKIM_TRACE(0.00)[gmx.net:+]; DMARC_POLICY_ALLOW(-0.50)[gmx.de,none]; HAS_X_PRIO_THREE(0.00)[3]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RECEIVED_SPAMHAUS_PBL(0.00)[46.142.163.189:received]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmx.de]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RBL_DBL_DONT_QUERY_IPS(0.00)[212.227.17.20:from]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; RCVD_IN_DNSWL_LOW(-0.10)[212.227.17.20:from]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[212.227.17.20:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NO_DN(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.17.20:from]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2020 20:58:32 -0000 >> On Sun, Dec 13, 2020 at 10:04 AM wrote: >>> >>> Hi, >>> >>> I habe a current system, where i have current and 12.2-STABLE jails. >>> Checking with jls, i get this output: >>> >>> root@fbsd13:~ # jls -h jid name ip4.addr host.hostname vnet osrelease >>> path | column -t >>> jid name ip4.addr host.hostname vnet osrelease path >>> 8 j0 192.168.0.10 j0.local 2 13.0-CURRENT /jails/j0 >>> 10 j1 - j1.local 1 13.0-CURRENT /jails/j1 >>> 12 j2 - j2.local 1 13.0-CURRENT /jails/j2 >>> >>> the jails are running this versions: >>> >>> root@fbsd13:~ # jexec -l j0 freebsd-version -u >>> 12.2-STABLE >>> root@fbsd13:~ # jexec -l j1 freebsd-version -u >>> 13.0-CURRENT >>> root@fbsd13:~ # jexec -l j2 freebsd-version -u >>> 12.2-STABLE >>> >>> >>> What is "osrelease"? Looking at the name, i would have guessed, it is >>> the >>> version of the freebsd userland, running in the jail. But it does't >>> seem so. >>> j1 and j2 are VNET jails, so it seems the 1 in the vnet column >>> signifies this, >>> j0 is a "standard" jail using the hosts network stack, so the 2 stands >>> for standard? >>> >> >> Hi, >> >> osrelease is what the jail sees as kern.osrelease and uname -r (see: >> jail(8)) (i.e. kernel version); it's either specified during jail >> creation or inherited from the parent prison if none is specified. >> >> It looks like it's exporting a jailsys int for vnet, so these >> correspond to: >> >> JAIL_SYS_DISABLE=3D0 >> JAIL_SYS_NEW=3D1 >> JAIL_SYS_INHERIT=3D2 >> >> So 2 is 'use parent vnet', 1 is 'new one created' -- I don't see this >> described in either jls(1) or jail(8), it'd probably be nice if we >> translated jailsys ints into "new"/"inherit" since one specifies >> "new"/"inherit" for them during creation. > >True, that would be more human-readable. For that matter, I could >report booleans (such as allow.whatever) as "true" or "false" as well. >In both cases, the strings pass back to jail(8) OK, but I wonder if >there are any scripts out there that actually use those values in their >numeric form. > >- Jamie Thanks, I did not realise, that osrelease and osreldate are "writable". When setting them in jail.conf they are shown by jls: root@fbsd13:~ # jls -h jid name vnet ip4.addr host.hostname osrelease osre= ldate path | column -t jid name vnet ip4.addr host.hostname osrelease osreldate pat= h 26 j0 2 192.168.0.10 j0 12.2-STABLE 1202504 /ja= ils/j0 27 j1 1 - j1 13.0-CURRENT 1300131 /ja= ils/j1 28 j2 1 - j2 12.2-STABLE 1202504 /ja= ils/j2 29 j4 1 - j4 12.2-STABLE 1202504 /ja= ils/j4 33 j5 2 192.168.0.15 j5 12.2-STABLE 1202504 /ja= ils/j5 the representation of the vnet value differs, depending on the used jls pa= rameters: root@fbsd13:~ # jls -j j0 -h vnet vnet 2 root@fbsd13:~ # jls -j j1 -h vnet vnet 1 and root@fbsd13:~ # jls -j j0 -n devfs_ruleset=3D4 nodying enforce_statfs=3D2 host=3Dnew ip4=3Ddisable ip6= =3Ddisable jid=3D26 name=3Dj0 osreldate=3D1202504 osrelease=3D12.2-STABLE parent=3D0 = path=3D/jails/j0 nopersist securelevel=3D-1 sysvmsg=3Dnew sysvsem=3Dnew sysvshm=3Dnew vnet= =3Dinherit ... root@fbsd13:~ # jls -j j1 -n devfs_ruleset=3D4 nodying enforce_statfs=3D2 host=3Dnew ip4=3Dinherit ip6= =3Dinherit jid=3D27 name=3Dj1 osreldate=3D1300131 osrelease=3D13.0-CURRENT parent=3D0= path=3D/jails/j1 nopersist securelevel=3D-1 sysvmsg=3Dnew sysvsem=3Dnew sysvshm=3Dnew vnet= =3Dnew ... =2D- Martin