<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/replace/system/filesys.h, branch master</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 renameat2() replacement</title>
<updated>2024-08-21T08:02:30+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2024-08-07T11:01:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f6550e804ea5604b1d7ec67e629fad8baee87f8b'/>
<id>f6550e804ea5604b1d7ec67e629fad8baee87f8b</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15693

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15693

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/replace: add a replacement for openat2() that returns ENOSYS</title>
<updated>2022-08-15T15:03:36+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2022-08-08T13:23:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=ce804b78164a3166a16ca3071028536761fd18d7'/>
<id>ce804b78164a3166a16ca3071028536761fd18d7</id>
<content type='text'>
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:replace: Only include &lt;sys/mount.h&gt; on non-Linux systems</title>
<updated>2022-08-02T11:05:14+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2022-08-02T05:55:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=766151bf5b7ef95ae4c8c98b8994e5c21c5bbec0'/>
<id>766151bf5b7ef95ae4c8c98b8994e5c21c5bbec0</id>
<content type='text'>
Details at:
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E

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

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Tue Aug  2 11:05:14 UTC 2022 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Details at:
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E

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

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;

Autobuild-User(master): Ralph Böhme &lt;slow@samba.org&gt;
Autobuild-Date(master): Tue Aug  2 11:05:14 UTC 2022 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "lib:replace: Remove &lt;sys/mount.h&gt; from filesys.h"</title>
<updated>2022-08-02T10:11:35+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2022-08-02T05:55:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9459f85511a11d9a159fc8c7bb3c2d781555f87d'/>
<id>9459f85511a11d9a159fc8c7bb3c2d781555f87d</id>
<content type='text'>
This reverts commit 7a6bd2279897ed389d10f09e5b315a7bca96e7d4.

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

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 7a6bd2279897ed389d10f09e5b315a7bca96e7d4.

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

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:replace: Remove &lt;sys/mount.h&gt; from filesys.h</title>
<updated>2022-07-29T13:08:36+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2022-07-29T08:08:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=7a6bd2279897ed389d10f09e5b315a7bca96e7d4'/>
<id>7a6bd2279897ed389d10f09e5b315a7bca96e7d4</id>
<content type='text'>
You need to be careful if you include &lt;sys/mount.h&gt; or &lt;linux/mount.h&gt;
at least since glibc 2.36.

Details at:
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E

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

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Guenther Deschner &lt;gd@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Fri Jul 29 13:08:36 UTC 2022 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
You need to be careful if you include &lt;sys/mount.h&gt; or &lt;linux/mount.h&gt;
at least since glibc 2.36.

Details at:
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E

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

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Guenther Deschner &lt;gd@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Fri Jul 29 13:08:36 UTC 2022 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>CI: add samba-no-opath</title>
<updated>2020-12-16T09:08:30+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2020-06-22T11:32:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=436903afe2aaf6e3afe794c9ebe22081a55b9bb3'/>
<id>436903afe2aaf6e3afe794c9ebe22081a55b9bb3</id>
<content type='text'>
Add a job that builds with O_PATH undefined.

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>
Add a job that builds with O_PATH undefined.

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>lib/replace: prefer &lt;sys/xattr.h&gt; over &lt;attr/xattr.h&gt;</title>
<updated>2019-12-18T10:13:41+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2019-12-14T17:35:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f8f3b33ea58a03dc3c17b03256530b6990ce9191'/>
<id>f8f3b33ea58a03dc3c17b03256530b6990ce9191</id>
<content type='text'>
This prevents the following compile error that may happens if "system/filesys.h"
is included before "system/capability.h" on Ubuntu 16.04:

  [1802/4407] Compiling source3/lib/system.c
  In file included from ../../lib/replace/system/filesys.h:112:0,
                   from ../../source3/include/vfs.h:29,
                   from ../../source3/include/smb.h:150,
                   from ../../source3/include/includes.h:284,
                   from ../../source3/lib/system.c:23:
  /usr/include/x86_64-linux-gnu/sys/xattr.h:32:3: error: expected identifier before numeric constant
     XATTR_CREATE = 1, /* set value, fail if attr already exists.  */
     ^

The above error is from compiling a source tree which includes a change that
adds an include "system/filesys.h" to the top of "source3/include/vfs.h".

"source3/lib/system.c" has the following includes:

  #include "includes.h"
  #include "system/syslog.h"
  #include "system/capability.h"
  #include "system/passwd.h"
  #include "system/filesys.h"
  #include "../lib/util/setid.h"

The first include of "includes.h" pulls in "vfs.h" which will pull in
"system/filesys.h" with the mentioned change. "system/filesys.h" pulls in
&lt;attr/xattr.h&gt; which has this define

  #define XATTR_CREATE  0x1

Later in "source3/lib/system.c" "system/capability.h" is included which includes
&lt;sys/xattr.h&gt; on Ubuntu 16.04 (not in later versions of glibc). This defines the
XATTR_* values as an enum:

  enum {
    XATTR_CREATE = 1,     /* set value, fail if attr already exists.  */
    XATTR_REPLACE = 2     /* set value, fail if attr does not exist.  */
  };

The previous define of XATTR_CREATE as 1 makes this

  enum {
    1 = 1,     /* set value, fail if attr already exists.  */
    2 = 2     /* set value, fail if attr does not exist.  */
  };

which is invalid C. The compiler error diagnostic is a bit confusing, as it
prints the original enum from the include file.

See also:

&lt;https://bugs.freedesktop.org/show_bug.cgi?id=78741&gt;
&lt;https://bugs.launchpad.net/ubuntu/+source/attr/+bug/1288091&gt;
&lt;https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756097&gt;

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Björn Baumbach &lt;bb@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This prevents the following compile error that may happens if "system/filesys.h"
is included before "system/capability.h" on Ubuntu 16.04:

  [1802/4407] Compiling source3/lib/system.c
  In file included from ../../lib/replace/system/filesys.h:112:0,
                   from ../../source3/include/vfs.h:29,
                   from ../../source3/include/smb.h:150,
                   from ../../source3/include/includes.h:284,
                   from ../../source3/lib/system.c:23:
  /usr/include/x86_64-linux-gnu/sys/xattr.h:32:3: error: expected identifier before numeric constant
     XATTR_CREATE = 1, /* set value, fail if attr already exists.  */
     ^

The above error is from compiling a source tree which includes a change that
adds an include "system/filesys.h" to the top of "source3/include/vfs.h".

"source3/lib/system.c" has the following includes:

  #include "includes.h"
  #include "system/syslog.h"
  #include "system/capability.h"
  #include "system/passwd.h"
  #include "system/filesys.h"
  #include "../lib/util/setid.h"

The first include of "includes.h" pulls in "vfs.h" which will pull in
"system/filesys.h" with the mentioned change. "system/filesys.h" pulls in
&lt;attr/xattr.h&gt; which has this define

  #define XATTR_CREATE  0x1

Later in "source3/lib/system.c" "system/capability.h" is included which includes
&lt;sys/xattr.h&gt; on Ubuntu 16.04 (not in later versions of glibc). This defines the
XATTR_* values as an enum:

  enum {
    XATTR_CREATE = 1,     /* set value, fail if attr already exists.  */
    XATTR_REPLACE = 2     /* set value, fail if attr does not exist.  */
  };

The previous define of XATTR_CREATE as 1 makes this

  enum {
    1 = 1,     /* set value, fail if attr already exists.  */
    2 = 2     /* set value, fail if attr does not exist.  */
  };

which is invalid C. The compiler error diagnostic is a bit confusing, as it
prints the original enum from the include file.

See also:

&lt;https://bugs.freedesktop.org/show_bug.cgi?id=78741&gt;
&lt;https://bugs.launchpad.net/ubuntu/+source/attr/+bug/1288091&gt;
&lt;https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756097&gt;

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Björn Baumbach &lt;bb@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/replace: work around an API conflict between ncurses and XFS xattr API</title>
<updated>2019-12-12T20:22:51+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2019-12-12T09:46:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=48ed60d7fd0b567c2450020b8ccaa2c6ff8913e3'/>
<id>48ed60d7fd0b567c2450020b8ccaa2c6ff8913e3</id>
<content type='text'>
Compile error:

  [4530/4693] Compiling source3/utils/regedit_list.c
  In file included from ../../source3/utils/regedit_list.h:24,
                   from ../../source3/utils/regedit_list.c:20:
  /usr/include/curses.h:611:28: error: conflicting types for ‘attr_get’
    611 | extern NCURSES_EXPORT(int) attr_get (attr_t *, NCURSES_PAIRS_T *, void *); /* generated */
        |                            ^~~~~~~~
  compilation terminated due to -Wfatal-errors.

Both ncurses and XFS xattr API provide a get_attr() function. As a workaround
avoid including &lt;sys|attr/attributes.h&gt; if &lt;attr|sys/xattr.h&gt; is present.

Signed-off-by: Ralph Boehme &lt;slow@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 Dec 12 20:22:51 UTC 2019 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Compile error:

  [4530/4693] Compiling source3/utils/regedit_list.c
  In file included from ../../source3/utils/regedit_list.h:24,
                   from ../../source3/utils/regedit_list.c:20:
  /usr/include/curses.h:611:28: error: conflicting types for ‘attr_get’
    611 | extern NCURSES_EXPORT(int) attr_get (attr_t *, NCURSES_PAIRS_T *, void *); /* generated */
        |                            ^~~~~~~~
  compilation terminated due to -Wfatal-errors.

Both ncurses and XFS xattr API provide a get_attr() function. As a workaround
avoid including &lt;sys|attr/attributes.h&gt; if &lt;attr|sys/xattr.h&gt; is present.

Signed-off-by: Ralph Boehme &lt;slow@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 Dec 12 20:22:51 UTC 2019 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>replace: remove needless vxfs header file check</title>
<updated>2019-02-17T12:33:12+00:00</updated>
<author>
<name>Björn Jacke</name>
<email>bj@sernet.de</email>
</author>
<published>2019-02-06T21:53:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2888bee43cb387f8d1037d017582e84160c3fd08'/>
<id>2888bee43cb387f8d1037d017582e84160c3fd08</id>
<content type='text'>
Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Uri Simchoni &lt;uri@samba.org&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: Uri Simchoni &lt;uri@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>replace: Use #ifdef instead of #if for config.h definitions</title>
<updated>2018-11-28T22:19:21+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2018-11-20T12:57:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9f2cd92c8e9527b0e45e6017345c0551776133a4'/>
<id>9f2cd92c8e9527b0e45e6017345c0551776133a4</id>
<content type='text'>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
</feed>
