[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Mon Nov 20 16:39:02 UTC 2023


The branch, master has been updated
       via  34d80fc96fe gitlab-ci: Update Fedora to version 39
       via  938afb8b289 python:tests: SHA1 is no longer supported by cryptography module
       via  362b0d69b16 python:tests: Fix assertEquals which doesn't exist in Python 3.12
       via  c290052fd28 third_party: Build pypamtest with -Wno-error=declaration-after-statement
       via  9621a3d7a69 Use python.h from libreplace
       via  f337fd99502 lib:replace: Add python.h
      from  5119d5540de s4-winreg: fix dcesrv_winreg_EnumValue behavior

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 34d80fc96fe48c74631978b29e712fc826385fca
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Nov 8 13:12:21 2023 +0100

    gitlab-ci: Update Fedora to version 39
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Mon Nov 20 16:38:20 UTC 2023 on atb-devel-224

commit 938afb8b28973b0065cc3509b70ebe3f6986de47
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Nov 9 22:27:03 2023 +0100

    python:tests: SHA1 is no longer supported by cryptography module
    
    See https://github.com/pyca/cryptography/issues/8213#issuecomment-1419060001
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 362b0d69b16c5bbcd0ff7dd7ba12e1ac037a6b3d
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Nov 9 21:43:54 2023 +0100

    python:tests: Fix assertEquals which doesn't exist in Python 3.12
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit c290052fd28bbfa5b885119f322cb0718073e507
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Nov 9 17:16:17 2023 +0100

    third_party: Build pypamtest with -Wno-error=declaration-after-statement
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 9621a3d7a6949aa833425884cd22379387738cfa
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Nov 9 11:35:56 2023 +0100

    Use python.h from libreplace
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit f337fd995024283f6e1b3f8ec1cc2b3aeb55a2a6
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Nov 9 11:32:58 2023 +0100

    lib:replace: Add python.h
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 .gitlab-ci-main.yml                                | 16 +++++++--------
 auth/credentials/pycredentials.c                   |  2 +-
 bootstrap/.gitlab-ci.yml                           |  2 +-
 bootstrap/config.py                                |  6 +++---
 bootstrap/generated-dists/Vagrantfile              | 10 ++++-----
 .../{fedora38 => fedora39}/Dockerfile              |  2 +-
 .../{fedora38 => fedora39}/bootstrap.sh            |  0
 .../{fedora38 => fedora39}/locale.sh               |  0
 .../{fedora38 => fedora39}/packages.yml            |  0
 bootstrap/sha1sum.txt                              |  2 +-
 buildtools/wafsamba/samba_autoconf.py              |  3 +++
 lib/compression/pycompression.c                    |  2 +-
 lib/crypto/py_crypto.c                             |  2 +-
 lib/ldb-samba/pyldb.c                              |  2 +-
 lib/ldb/pyldb.c                                    |  2 +-
 lib/ldb/pyldb_util.c                               |  2 +-
 .../hash_inode.h => lib/replace/system/python.h    | 19 ++++++++++-------
 lib/smbconf/pysmbconf.c                            |  2 +-
 lib/smbconf/pysmbconf.h                            |  2 +-
 lib/talloc/pytalloc.c                              |  2 +-
 lib/talloc/pytalloc_util.c                         |  2 +-
 lib/talloc/test_pytalloc.c                         |  2 +-
 lib/tdb/pytdb.c                                    |  2 +-
 lib/tevent/pytevent.c                              |  2 +-
 libcli/nbt/pynbt.c                                 |  2 +-
 libcli/security/pysecurity.c                       |  2 +-
 libcli/smb/py_reparse_symlink.c                    |  2 +-
 libgpo/pygpo.c                                     |  2 +-
 pidl/lib/Parse/Pidl/Samba4/Python.pm               |  2 +-
 python/modules.c                                   |  2 +-
 python/py3compat.h                                 |  2 +-
 python/pyglue.c                                    |  2 +-
 python/samba/tests/gpo.py                          |  2 +-
 python/samba/tests/krb5/pkinit_tests.py            | 24 +---------------------
 source3/lib/smbconf/pys3smbconf.c                  |  2 +-
 source3/libsmb/pylibsmb.c                          |  2 +-
 source3/param/pyparam.c                            |  2 +-
 source3/param/pyparam_util.c                       |  2 +-
 source3/passdb/py_passdb.c                         |  2 +-
 source3/rpc_client/py_mdscli.c                     |  2 +-
 source3/smbd/pysmbd.c                              |  2 +-
 source3/utils/py_net.c                             |  2 +-
 source4/auth/gensec/pygensec.c                     |  2 +-
 source4/auth/pyauth.c                              |  2 +-
 source4/dns_server/pydns.c                         |  2 +-
 source4/dsdb/pydsdb.c                              |  2 +-
 source4/lib/messaging/pymessaging.c                |  2 +-
 source4/lib/policy/pypolicy.c                      |  2 +-
 source4/lib/registry/pyregistry.c                  |  2 +-
 source4/libnet/py_net.c                            |  2 +-
 source4/libnet/py_net_dckeytab.c                   |  2 +-
 source4/librpc/ndr/py_auth.c                       |  2 +-
 source4/librpc/ndr/py_lsa.c                        |  2 +-
 source4/librpc/ndr/py_misc.c                       |  2 +-
 source4/librpc/ndr/py_security.c                   |  2 +-
 source4/librpc/ndr/py_xattr.c                      |  2 +-
 source4/librpc/rpc/pyrpc.c                         |  2 +-
 source4/librpc/rpc/pyrpc_util.c                    |  2 +-
 source4/ntvfs/posix/python/pyposix_eadb.c          |  2 +-
 source4/ntvfs/posix/python/pyxattr_native.c        |  2 +-
 source4/ntvfs/posix/python/pyxattr_tdb.c           |  2 +-
 source4/param/provision.c                          |  2 +-
 source4/param/pyparam.c                            |  2 +-
 source4/param/pyparam_util.c                       |  2 +-
 source4/scripting/bin/gen_ntstatus.py              |  2 +-
 source4/scripting/bin/gen_werror.py                |  2 +-
 third_party/pam_wrapper/wscript                    |  5 +++++
 67 files changed, 94 insertions(+), 103 deletions(-)
 rename bootstrap/generated-dists/{fedora38 => fedora39}/Dockerfile (91%)
 rename bootstrap/generated-dists/{fedora38 => fedora39}/bootstrap.sh (100%)
 rename bootstrap/generated-dists/{fedora38 => fedora39}/locale.sh (100%)
 rename bootstrap/generated-dists/{fedora38 => fedora39}/packages.yml (100%)
 copy source3/modules/hash_inode.h => lib/replace/system/python.h (60%)


Changeset truncated at 500 lines:

diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml
index 6614ef74e64..add5f323ec4 100644
--- a/.gitlab-ci-main.yml
+++ b/.gitlab-ci-main.yml
@@ -47,7 +47,7 @@ variables:
   # Set this to the contents of bootstrap/sha1sum.txt
   # which is generated by bootstrap/template.py --render
   #
-  SAMBA_CI_CONTAINER_TAG: 07a822597b5bce4af9e8e2987856b27eb20bd1b7
+  SAMBA_CI_CONTAINER_TAG: 9a406973474a7903fe7fd6215226660911ed73c0
   #
   # We use the ubuntu2204 image as default as
   # it matches what we have on atb-devel-224
@@ -64,7 +64,7 @@ variables:
   SAMBA_CI_CONTAINER_IMAGE_debian11_32bit: debian11-32bit
   SAMBA_CI_CONTAINER_IMAGE_debian12: debian12
   SAMBA_CI_CONTAINER_IMAGE_opensuse155: opensuse155
-  SAMBA_CI_CONTAINER_IMAGE_fedora38: fedora38
+  SAMBA_CI_CONTAINER_IMAGE_fedora39: fedora39
   SAMBA_CI_CONTAINER_IMAGE_centos7: centos7
   SAMBA_CI_CONTAINER_IMAGE_centos8s: centos8s
 
@@ -262,13 +262,13 @@ samba-def-build:
 samba-mit-build:
   extends: .shared_template_build_only
   variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
+    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora39}
   stage: build_first
 
 .needs_samba-mit-build:
   extends: .shared_template_test_only
   variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
+    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora39}
   needs:
     - job: samba-mit-build
       artifacts: true
@@ -316,7 +316,7 @@ samba:
 samba-mitkrb5:
   extends: .shared_template
   variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
+    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora39}
 
 samba-minimal-smbd:
   extends: .shared_template
@@ -386,7 +386,7 @@ samba-addc-mit-4b:
 samba-fips:
   extends: .shared_template
   variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
+    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora39}
 
 samba-codecheck:
   extends: .shared_template
@@ -671,10 +671,10 @@ centos8s-samba-o3:
   variables:
     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_centos8s}
 
-fedora38-samba-o3:
+fedora39-samba-o3:
   extends: .samba-o3-template
   variables:
-    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
+    SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora39}
 
 #
 # Keep the samba-o3 sections at the end ...
diff --git a/auth/credentials/pycredentials.c b/auth/credentials/pycredentials.c
index bd877941a9a..3687050bde9 100644
--- a/auth/credentials/pycredentials.c
+++ b/auth/credentials/pycredentials.c
@@ -16,7 +16,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "python/py3compat.h"
 #include "includes.h"
 #include "python/modules.h"
diff --git a/bootstrap/.gitlab-ci.yml b/bootstrap/.gitlab-ci.yml
index 71c68d9ee14..ba82cdc1251 100644
--- a/bootstrap/.gitlab-ci.yml
+++ b/bootstrap/.gitlab-ci.yml
@@ -100,7 +100,7 @@ debian11:
 debian12:
   extends: .build_image_template
 
-fedora38:
+fedora39:
   extends: .build_image_template
 
 debian11-32bit:
diff --git a/bootstrap/config.py b/bootstrap/config.py
index cfee5e049ce..11d8314aefc 100644
--- a/bootstrap/config.py
+++ b/bootstrap/config.py
@@ -541,9 +541,9 @@ RPM_DISTS = {
             'codespell': '',
         }
     },
-    'fedora38': {
-        'docker_image': 'quay.io/fedora/fedora:38',
-        'vagrant_box': 'fedora/38-cloud-base',
+    'fedora39': {
+        'docker_image': 'quay.io/fedora/fedora:39',
+        'vagrant_box': 'fedora/39-cloud-base',
         'bootstrap': DNF_BOOTSTRAP,
         'replace': {
             'lsb-release': 'redhat-lsb',
diff --git a/bootstrap/generated-dists/Vagrantfile b/bootstrap/generated-dists/Vagrantfile
index e1325695584..2c6468d768b 100644
--- a/bootstrap/generated-dists/Vagrantfile
+++ b/bootstrap/generated-dists/Vagrantfile
@@ -52,11 +52,11 @@ Vagrant.configure("2") do |config|
         v.vm.provision :shell, path: "debian12-32bit/locale.sh"
     end
 
-    config.vm.define "fedora38" do |v|
-        v.vm.box = "fedora/38-cloud-base"
-        v.vm.hostname = "fedora38"
-        v.vm.provision :shell, path: "fedora38/bootstrap.sh"
-        v.vm.provision :shell, path: "fedora38/locale.sh"
+    config.vm.define "fedora39" do |v|
+        v.vm.box = "fedora/39-cloud-base"
+        v.vm.hostname = "fedora39"
+        v.vm.provision :shell, path: "fedora39/bootstrap.sh"
+        v.vm.provision :shell, path: "fedora39/locale.sh"
     end
 
     config.vm.define "opensuse155" do |v|
diff --git a/bootstrap/generated-dists/fedora38/Dockerfile b/bootstrap/generated-dists/fedora39/Dockerfile
similarity index 91%
rename from bootstrap/generated-dists/fedora38/Dockerfile
rename to bootstrap/generated-dists/fedora39/Dockerfile
index 56426229c2b..144dc8e71c2 100644
--- a/bootstrap/generated-dists/fedora38/Dockerfile
+++ b/bootstrap/generated-dists/fedora39/Dockerfile
@@ -3,7 +3,7 @@
 # See also bootstrap/config.py
 #
 
-FROM quay.io/fedora/fedora:38
+FROM quay.io/fedora/fedora:39
 
 # pass in with --build-arg while build
 ARG SHA1SUM
diff --git a/bootstrap/generated-dists/fedora38/bootstrap.sh b/bootstrap/generated-dists/fedora39/bootstrap.sh
similarity index 100%
rename from bootstrap/generated-dists/fedora38/bootstrap.sh
rename to bootstrap/generated-dists/fedora39/bootstrap.sh
diff --git a/bootstrap/generated-dists/fedora38/locale.sh b/bootstrap/generated-dists/fedora39/locale.sh
similarity index 100%
rename from bootstrap/generated-dists/fedora38/locale.sh
rename to bootstrap/generated-dists/fedora39/locale.sh
diff --git a/bootstrap/generated-dists/fedora38/packages.yml b/bootstrap/generated-dists/fedora39/packages.yml
similarity index 100%
rename from bootstrap/generated-dists/fedora38/packages.yml
rename to bootstrap/generated-dists/fedora39/packages.yml
diff --git a/bootstrap/sha1sum.txt b/bootstrap/sha1sum.txt
index 9d2acc49de9..61ecaf0ccf6 100644
--- a/bootstrap/sha1sum.txt
+++ b/bootstrap/sha1sum.txt
@@ -1 +1 @@
-07a822597b5bce4af9e8e2987856b27eb20bd1b7
+9a406973474a7903fe7fd6215226660911ed73c0
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 546b0daf932..16f962ded60 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -820,6 +820,9 @@ int main(void) {
         if CHECK_CFLAGS(conf, ["-Wno-error=stringop-overflow"]):
             conf.define('HAVE_WNO_ERROR_STRINGOP_OVERFLOW', 1)
 
+        if CHECK_CFLAGS(conf, ["-Wno-error=declaration-after-statement"]):
+            conf.define('HAVE_WNO_ERROR_DECLARATION_AFTER_STATEMENT', 1)
+
         if not Options.options.disable_warnings_as_errors:
             conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Werror -Wno-error=deprecated-declarations', testflags=True)
             conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=tautological-compare', testflags=True)
diff --git a/lib/compression/pycompression.c b/lib/compression/pycompression.c
index 3be3620b1cf..5c3fd82a00a 100644
--- a/lib/compression/pycompression.c
+++ b/lib/compression/pycompression.c
@@ -26,7 +26,7 @@
 
 #include "includes.h"
 #include <talloc.h>
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "lzxpress.h"
 #include "lzxpress_huffman.h"
 
diff --git a/lib/crypto/py_crypto.c b/lib/crypto/py_crypto.c
index 35ccc79a99e..26a0a09f5eb 100644
--- a/lib/crypto/py_crypto.c
+++ b/lib/crypto/py_crypto.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "includes.h"
 #include "python/py3compat.h"
 
diff --git a/lib/ldb-samba/pyldb.c b/lib/ldb-samba/pyldb.c
index 01ed065947a..2241abc01df 100644
--- a/lib/ldb-samba/pyldb.c
+++ b/lib/ldb-samba/pyldb.c
@@ -19,7 +19,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "python/py3compat.h"
 #include "includes.h"
 #include <ldb.h>
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index f398887e579..3177e20bb8b 100644
--- a/lib/ldb/pyldb.c
+++ b/lib/ldb/pyldb.c
@@ -28,7 +28,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "ldb_private.h"
 #include "ldb_handlers.h"
 #include "pyldb.h"
diff --git a/lib/ldb/pyldb_util.c b/lib/ldb/pyldb_util.c
index 7a5b26b04f3..d1c5fad2b56 100644
--- a/lib/ldb/pyldb_util.c
+++ b/lib/ldb/pyldb_util.c
@@ -23,7 +23,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "ldb.h"
 #include "pyldb.h"
 
diff --git a/source3/modules/hash_inode.h b/lib/replace/system/python.h
similarity index 60%
copy from source3/modules/hash_inode.h
copy to lib/replace/system/python.h
index e08fc48aa15..b242baecb1c 100644
--- a/source3/modules/hash_inode.h
+++ b/lib/replace/system/python.h
@@ -1,7 +1,5 @@
 /*
- * Unix SMB/Netbios implementation.
- *
- * Copyright (c) 2019      Andreas Schneider <asn at samba.org>
+ * Copyright (c) 2023      Andreas Schneider <asn at samba.org>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,9 +15,16 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _HASH_INODE_H
-#define _HASH_INODE_H
+#ifndef _SAMBA_PYTHON_H
+#define _SAMBA_PYTHON_H
 
-SMB_INO_T hash_inode(const SMB_STRUCT_STAT *sbuf, const char *sname);
+/*
+ * With Python 3.6 Cpython started to require C99. With Python 3.12 they
+ * started to mix code and variable declarations so disable the warnings.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
+#include <Python.h>
+#pragma GCC diagnostic pop
 
-#endif /* _HASH_INODE_H */
+#endif /* _SAMBA_PYTHON_H */
diff --git a/lib/smbconf/pysmbconf.c b/lib/smbconf/pysmbconf.c
index 20041d3a580..2538127b1ba 100644
--- a/lib/smbconf/pysmbconf.c
+++ b/lib/smbconf/pysmbconf.c
@@ -18,7 +18,7 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "includes.h"
 #include "python/py3compat.h"
 
diff --git a/lib/smbconf/pysmbconf.h b/lib/smbconf/pysmbconf.h
index e8c6c9998e3..1e57bfb19dd 100644
--- a/lib/smbconf/pysmbconf.h
+++ b/lib/smbconf/pysmbconf.h
@@ -21,7 +21,7 @@
 #ifndef _PYSMBCONF_H_
 #define _PYSMBCONF_H_
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "lib/smbconf/smbconf.h"
 
 typedef struct {
diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c
index 9d62eed455e..f6f068108d6 100644
--- a/lib/talloc/pytalloc.c
+++ b/lib/talloc/pytalloc.c
@@ -21,7 +21,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include <talloc.h>
 #include <pytalloc.h>
 #include "pytalloc_private.h"
diff --git a/lib/talloc/pytalloc_util.c b/lib/talloc/pytalloc_util.c
index 064957ffd6f..766938a82c8 100644
--- a/lib/talloc/pytalloc_util.c
+++ b/lib/talloc/pytalloc_util.c
@@ -21,7 +21,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "replace.h"
 #include <talloc.h>
 #include "pytalloc.h"
diff --git a/lib/talloc/test_pytalloc.c b/lib/talloc/test_pytalloc.c
index aa05d8c342b..fb385852a39 100644
--- a/lib/talloc/test_pytalloc.c
+++ b/lib/talloc/test_pytalloc.c
@@ -26,7 +26,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include <talloc.h>
 #include <pytalloc.h>
 
diff --git a/lib/tdb/pytdb.c b/lib/tdb/pytdb.c
index ed22803328c..4d75d7a9041 100644
--- a/lib/tdb/pytdb.c
+++ b/lib/tdb/pytdb.c
@@ -24,7 +24,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "replace.h"
 #include "system/filesys.h"
 
diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c
index aa2331c1d6c..bbe29f6c693 100644
--- a/lib/tevent/pytevent.c
+++ b/lib/tevent/pytevent.c
@@ -22,7 +22,7 @@
    License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "replace.h"
 #include <tevent.h>
 
diff --git a/libcli/nbt/pynbt.c b/libcli/nbt/pynbt.c
index 0908a6bce3c..e0a72fa8451 100644
--- a/libcli/nbt/pynbt.c
+++ b/libcli/nbt/pynbt.c
@@ -17,7 +17,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "includes.h"
 #include "python/py3compat.h"
 #include "libcli/util/pyerrors.h"
diff --git a/libcli/security/pysecurity.c b/libcli/security/pysecurity.c
index fb9fe469dc3..037d43c62f0 100644
--- a/libcli/security/pysecurity.c
+++ b/libcli/security/pysecurity.c
@@ -17,7 +17,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "python/py3compat.h"
 #include "includes.h"
 #include "python/modules.h"
diff --git a/libcli/smb/py_reparse_symlink.c b/libcli/smb/py_reparse_symlink.c
index 93e5cf8f049..5626e270803 100644
--- a/libcli/smb/py_reparse_symlink.c
+++ b/libcli/smb/py_reparse_symlink.c
@@ -16,7 +16,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "replace.h"
 #include "python/modules.h"
 #include "python/py3compat.h"
diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c
index bf63a60522f..adbd5b4688d 100644
--- a/libgpo/pygpo.c
+++ b/libgpo/pygpo.c
@@ -16,7 +16,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "includes.h"
 #include "version.h"
 #include "param/pyparam.h"
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 2d1e0610245..432f8724ba0 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -2292,7 +2292,7 @@ sub Parse($$$$$)
     $self->pidl_hdr("
 /* Python wrapper functions auto-generated by pidl */
 #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
-#include <Python.h>
+#include \"lib/replace/system/python.h\"
 #include \"python/py3compat.h\"
 #include \"includes.h\"
 #include \"python/modules.h\"
diff --git a/python/modules.c b/python/modules.c
index cacca63bbb3..7934f3e35db 100644
--- a/python/modules.c
+++ b/python/modules.c
@@ -17,7 +17,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "py3compat.h"
 #include "includes.h"
 #include "python/modules.h"
diff --git a/python/py3compat.h b/python/py3compat.h
index 01108214783..bfee82f92b3 100644
--- a/python/py3compat.h
+++ b/python/py3compat.h
@@ -19,7 +19,7 @@
 
 #ifndef _SAMBA_PY3COMPAT_H_
 #define _SAMBA_PY3COMPAT_H_
-#include <Python.h>
+#include "lib/replace/system/python.h"
 
 /* Quick docs:
  * Syntax for module initialization is as in Python 3, except the entrypoint
diff --git a/python/pyglue.c b/python/pyglue.c
index e7b01b83c80..8fb5f7a1f9f 100644
--- a/python/pyglue.c
+++ b/python/pyglue.c
@@ -17,7 +17,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "lib/replace/system/python.h"
 #include "python/py3compat.h"
 #include "includes.h"
 #include "python/modules.h"
diff --git a/python/samba/tests/gpo.py b/python/samba/tests/gpo.py
index 33be897405b..f85780685d6 100644
--- a/python/samba/tests/gpo.py
+++ b/python/samba/tests/gpo.py
@@ -7897,7 +7897,7 @@ class GPOTests(tests.TestCase):
 
         # Check that a call to gpupdate --rsop also succeeds
         ret = rsop(self.lp)
-        self.assertEquals(ret, 0, 'gpupdate --rsop failed!')
+        self.assertEqual(ret, 0, 'gpupdate --rsop failed!')
 
         # Unstage the Drives.xml
         unstage_file(xml_path)
diff --git a/python/samba/tests/krb5/pkinit_tests.py b/python/samba/tests/krb5/pkinit_tests.py
index 15166499adc..3d47c799f86 100755
--- a/python/samba/tests/krb5/pkinit_tests.py
+++ b/python/samba/tests/krb5/pkinit_tests.py
@@ -79,28 +79,6 @@ class PkInitTests(KDCBaseTest):
             account_type=account_type,
             opts={'upn': f'{{account}}.{realm}@{realm}'})
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list