<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/replace/xattr.c, branch talloc-2.4.0</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>lib/replace - add extra check to bsd_attr_list</title>
<updated>2023-01-02T14:27:23+00:00</updated>
<author>
<name>Andrew Walker</name>
<email>awalker@ixsystems.com</email>
</author>
<published>2022-12-27T15:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=01cdc5e00be78a51f0766634cc7fe50de2088203'/>
<id>01cdc5e00be78a51f0766634cc7fe50de2088203</id>
<content type='text'>
The FreeBSD extattr API may return success and truncated
namelist. We need to check for this in bsd_attr_list to
ensure that we don't accidentally read off the end of the
buffer. In the case of a truncated value, the pascal
strings for attr names will reflect the lengths as if
the value were not truncated. For example:
`58DosStrea`

In case of short read we now set error to ERANGE and
fail.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15271

Signed-off-by: Andrew Walker &lt;awalker@ixsystems.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Mon Jan  2 14:27:23 UTC 2023 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The FreeBSD extattr API may return success and truncated
namelist. We need to check for this in bsd_attr_list to
ensure that we don't accidentally read off the end of the
buffer. In the case of a truncated value, the pascal
strings for attr names will reflect the lengths as if
the value were not truncated. For example:
`58DosStrea`

In case of short read we now set error to ERANGE and
fail.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15271

Signed-off-by: Andrew Walker &lt;awalker@ixsystems.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Mon Jan  2 14:27:23 UTC 2023 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Align an integer type</title>
<updated>2022-08-04T20:44:32+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2022-08-03T09:05:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c89ae5f0f65d727bd7084a52175089aa60dda428'/>
<id>c89ae5f0f65d727bd7084a52175089aa60dda428</id>
<content type='text'>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/replace/xattr.c: typo fixes</title>
<updated>2019-10-31T00:43:36+00:00</updated>
<author>
<name>Björn Jacke</name>
<email>bj@sernet.de</email>
</author>
<published>2019-10-26T00:41:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=ba1887d37422f39bd36d0ab17dd1ef8efa56cb63'/>
<id>ba1887d37422f39bd36d0ab17dd1ef8efa56cb63</id>
<content type='text'>
Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>replace/setxattr: correctly use our flags on Darwin</title>
<updated>2019-08-29T17:10:32+00:00</updated>
<author>
<name>Björn Jacke</name>
<email>bj@sernet.de</email>
</author>
<published>2019-03-02T04:47:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=3aea2c0f1f498fdb515cbd1d04b1ba3ce7f4cc3b'/>
<id>3aea2c0f1f498fdb515cbd1d04b1ba3ce7f4cc3b</id>
<content type='text'>
Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Björn Jacke &lt;bjacke@samba.org&gt;
Autobuild-Date(master): Thu Aug 29 17:10:32 UTC 2019 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Björn Jacke &lt;bjacke@samba.org&gt;
Autobuild-Date(master): Thu Aug 29 17:10:32 UTC 2019 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>xattr/setxattr: fix flag support on AIX</title>
<updated>2019-08-29T15:53:30+00:00</updated>
<author>
<name>Björn Jacke</name>
<email>bj@sernet.de</email>
</author>
<published>2019-03-02T04:39:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=56e0ffa11319eebbe0d8b07502aa3ec8971435d0'/>
<id>56e0ffa11319eebbe0d8b07502aa3ec8971435d0</id>
<content type='text'>
AIX requires the flags to be 0, we need to do those checks manually.

Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
AIX requires the flags to be 0, we need to do those checks manually.

Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>replace/setxattr: set reasonable and unified errno value in case the EA value was too big</title>
<updated>2019-08-29T15:53:30+00:00</updated>
<author>
<name>Björn Jacke</name>
<email>bj@sernet.de</email>
</author>
<published>2019-03-02T04:01:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=b8f4be98f5d22eb034a953ebefab88752bf4a099'/>
<id>b8f4be98f5d22eb034a953ebefab88752bf4a099</id>
<content type='text'>
FreeBSD and AIX already set errno to ENAMETOOLONG, this is what we should map
other platforms also to to finally map to the correct NT error code also.

Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FreeBSD and AIX already set errno to ENAMETOOLONG, this is what we should map
other platforms also to to finally map to the correct NT error code also.

Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: bundle and reduce huge number of EA function tests</title>
<updated>2018-07-03T11:24:51+00:00</updated>
<author>
<name>Björn Jacke</name>
<email>bjacke@samba.org</email>
</author>
<published>2018-03-12T17:44:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=3287bfe2b4ab0676b40666594b00b64ab027e04d'/>
<id>3287bfe2b4ab0676b40666594b00b64ab027e04d</id>
<content type='text'>
It's sufficient to check for one basic function of an EA implementation and a
use a single ifdef for each group of EA functions. This makes more sense than
checking for each EA function on each platform.

Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Tue Jul  3 13:24:51 CEST 2018 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's sufficient to check for one basic function of an EA implementation and a
use a single ifdef for each group of EA functions. This makes more sense than
checking for each EA function on each platform.

Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Tue Jul  3 13:24:51 CEST 2018 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/replace: validate xattr namespace prefix on FreeBSD</title>
<updated>2017-02-10T17:33:17+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2017-02-03T17:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=738797d8ad6908de457786cc948dcde151e2b9e1'/>
<id>738797d8ad6908de457786cc948dcde151e2b9e1</id>
<content type='text'>
We should validate the xattr name string ensuring it either begins with
"sytem." or "user.". If it doesn't, we should fail the request with
EINVAL.

The FreeBSD xattr API uses namespaces but doesn't put the namespace name
as a string prefix at the beginning of the xattr name. It gets passed as
an additional int arg instead.

On the other hand, our libreplace xattr API expects the caller to put a
namespace prefix into the xattr name.

Unfortunately the conversion and stripping of the namespace string prefix
from the xattr name gives the following unexpected result on FreeBSD:

rep_setxattr("foo.bar", ...) =&gt; xattr with name "bar"

The code checks if the name begins with "system.", if it doesn't find
it, it defaults to the user namespace and then does a strchr(name, '.')
which skips *any* leading string before the first dot.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12490

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should validate the xattr name string ensuring it either begins with
"sytem." or "user.". If it doesn't, we should fail the request with
EINVAL.

The FreeBSD xattr API uses namespaces but doesn't put the namespace name
as a string prefix at the beginning of the xattr name. It gets passed as
an additional int arg instead.

On the other hand, our libreplace xattr API expects the caller to put a
namespace prefix into the xattr name.

Unfortunately the conversion and stripping of the namespace string prefix
from the xattr name gives the following unexpected result on FreeBSD:

rep_setxattr("foo.bar", ...) =&gt; xattr with name "bar"

The code checks if the name begins with "system.", if it doesn't find
it, it defaults to the user namespace and then does a strchr(name, '.')
which skips *any* leading string before the first dot.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12490

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>replace: Fix developer build on BSD.</title>
<updated>2013-11-21T02:37:59+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2013-11-19T17:14:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=979d9dbbb709c99c77b02fbc7429a0d0472ac2f4'/>
<id>979d9dbbb709c99c77b02fbc7429a0d0472ac2f4</id>
<content type='text'>
This fixes bsd_attr_list() calling geteuid().

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;

Autobuild-User(master): Jeremy Allison &lt;jra@samba.org&gt;
Autobuild-Date(master): Thu Nov 21 03:37:59 CET 2013 on sn-devel-104
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes bsd_attr_list() calling geteuid().

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;

Autobuild-User(master): Jeremy Allison &lt;jra@samba.org&gt;
Autobuild-Date(master): Thu Nov 21 03:37:59 CET 2013 on sn-devel-104
</pre>
</div>
</content>
</entry>
<entry>
<title>xattr: fix listing EAs on *BSD for non-root users</title>
<updated>2013-11-08T19:43:29+00:00</updated>
<author>
<name>Björn Jacke</name>
<email>bj@sernet.de</email>
</author>
<published>2013-11-06T11:37:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=374b2cfde74e0c61f4b2da724b30d0e430596092'/>
<id>374b2cfde74e0c61f4b2da724b30d0e430596092</id>
<content type='text'>
Thanks to Stefan Rompf for reporting.

This fixes bug #10247

Signed-off-by: Bjoern Jacke &lt;bj@sernet.de&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;

Autobuild-User(master): Jeremy Allison &lt;jra@samba.org&gt;
Autobuild-Date(master): Fri Nov  8 20:43:30 CET 2013 on sn-devel-104
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Thanks to Stefan Rompf for reporting.

This fixes bug #10247

Signed-off-by: Bjoern Jacke &lt;bj@sernet.de&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;

Autobuild-User(master): Jeremy Allison &lt;jra@samba.org&gt;
Autobuild-Date(master): Fri Nov  8 20:43:30 CET 2013 on sn-devel-104
</pre>
</div>
</content>
</entry>
</feed>
