Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jul 2017 10:56:07 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Dewayne Geraghty <dewayne.geraghty@heuristicsystems.com.au>
Cc:        FreeBSD Stable Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: Extended "system" attributes within jailed environment dont work
Message-ID:  <20170714075607.GQ1935@kib.kiev.ua>
In-Reply-To: <cb70e03c-4dce-a530-2cf7-daaf1d9df74f@heuristicsystems.com.au>
References:  <cb70e03c-4dce-a530-2cf7-daaf1d9df74f@heuristicsystems.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 14, 2017 at 01:53:40PM +1000, Dewayne Geraghty wrote:
> Can someone advise how I can enable extended attributes in a "system"
> namespace within a jailed (or bhyve) environment?  There was no guidance
> in "man jail" nor "man jail.conf".
Mentioning jails and bhyve in a single sentence clearly indicates serious
issues with understanding either feature.

> 
> Simple test
> >From the host or base system:
> # touch /a ; setextattr user t1 first /a ; getextattr user t1 /a
> /a      first
> # touch /a ; setextattr system t2 second /a ; getextattr system t2 /a
> /a      second
> 
> Within a jail:
> # touch /a ; setextattr user t1 first /a ; getextattr user t1 /a
> /a      first
> # touch /a ; setextattr system t2 second /a ; getextattr system t2 /a
> setextattr: /a: failed: Operation not permitted
> getextattr: /a: failed: Operation not permitted
> 
> The impact of this is that SAMBA after 4.3 uses "system" namespace
> extended attributes; hence can not provision an Active Directory within
> a jailed environment.  (For the inclined, this affects sysvol, and
> interestingly "rsync -x" is unable to copy extended attributes, so
> having consistent sysvols across a SAMBA domain may be a challenge)
System namespace access is not allowed for jailed processes by design.
See sys/kern/vfs_subr.c:extattr_check_cred() and a comment there
explicitely mentioning the behaviour. The behaviour predates ~ year
2002, where extended attributes were introduced, and it makes sense.




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