[SCM] Samba Shared Repository - branch master updated

2023-02-02 Thread Andrew Bartlett
The branch, master has been updated
   via  e26a01a48c4 pidl: avoid py compile issues with --pidl-developer
   via  b2a2eeb6f99 tevent/pytevent: remove no-op define
   via  8f2f3b00c2f tevent/pytevent: remove py2 ifdefs
   via  c0ef6ca98bb tdb/pytdb: remove useless HAVE_ITER non-flag
   via  fe0ee4c tdb/pytdb: remove py ifdefs
   via  310eafdb7b3 s4/ndr/py_security: remove python 2 ifdefs
   via  ddbe69afbd1 s4/ndr/py_misc: remove python 2 ifdefs
   via  38d0147f6a5 ldb/pyldb: remove py2 ifdefs
   via  5723737ebb1 gp: Test samba-tool gpo cse register/unregister/list
   via  3eee4415bca gp: samba-tool gpo cse register/unregister/list
  from  851127f5c9a Python: remove pydoctor

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


- Log -
commit e26a01a48c4a6ca6f9424ced72eda68e6eb1e7e3
Author: Douglas Bagnall 
Date:   Fri Dec 9 10:36:30 2022 +1300

pidl: avoid py compile issues with --pidl-developer

We get these warnings-as-errors:

librpc/gen_ndr/py_netlogon.c:61903:53: error: stray ‘\’ in program
61903 |PyErr_Format(PyExc_TypeError, "Expected type %s",\  // 
Parse::Pidl::Samba4::Python::ConvertObjectFromPythonData  
lib/Parse/Pidl/Samba4/Python.pm:2005

but the '\' is unnecessary and unconventional anyway, since we're in a
function argument list.

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Fri Feb  3 03:27:54 UTC 2023 on atb-devel-224

commit b2a2eeb6f99a7e10412317964de1d50802f4ddf4
Author: Douglas Bagnall 
Date:   Wed Feb 1 13:19:56 2023 +1300

tevent/pytevent: remove no-op define

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit 8f2f3b00c2fb3aade9f136d758e76d4ce9601ae2
Author: Douglas Bagnall 
Date:   Wed Feb 1 13:17:21 2023 +1300

tevent/pytevent: remove py2 ifdefs

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit c0ef6ca98bb9d494c5810313d8ab30b149e82953
Author: Douglas Bagnall 
Date:   Wed Feb 1 13:08:27 2023 +1300

tdb/pytdb: remove useless HAVE_ITER non-flag

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit fe0ee4cdc1ee50788d5d727f50cb8abde476
Author: Douglas Bagnall 
Date:   Wed Feb 1 13:06:24 2023 +1300

tdb/pytdb: remove py ifdefs

This already would not compile with Python 2, because Py_TPFLAGS_HAVE_ITER
is not defined

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit 310eafdb7b3b594c3e2340520b4eadd1fa813497
Author: Douglas Bagnall 
Date:   Wed Feb 1 12:55:18 2023 +1300

s4/ndr/py_security: remove python 2 ifdefs

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit ddbe69afbd1b93f69d8ed21b08ad03925de1db73
Author: Douglas Bagnall 
Date:   Wed Feb 1 12:54:49 2023 +1300

s4/ndr/py_misc: remove python 2 ifdefs

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit 38d0147f6a535b09a5b59f0aba8af23c9e0d2115
Author: Douglas Bagnall 
Date:   Wed Feb 1 12:52:59 2023 +1300

ldb/pyldb: remove py2 ifdefs

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

commit 5723737ebb12d1f6d13863b685bbbd362026dc69
Author: David Mulder 
Date:   Fri Jan 13 09:07:38 2023 -0700

gp: Test samba-tool gpo cse register/unregister/list

Signed-off-by: David Mulder 
Reviewed-by: Andrew Bartlett 

commit 3eee4415bca6645e35da93d15d399ac85db9c126
Author: David Mulder 
Date:   Fri Jan 13 09:05:26 2023 -0700

gp: samba-tool gpo cse register/unregister/list

Add samba-tool commands for managing registration
of Client Side Extensions.

Signed-off-by: David Mulder 
Reviewed-by: Andrew Bartlett 

---

Summary of changes:
 lib/ldb/pyldb.c  |  22 ---
 lib/tdb/pytdb.c  |  48 +--
 lib/tevent/pytevent.c|  17 --
 pidl/lib/Parse/Pidl/Samba4/Python.pm |   8 +--
 python/samba/netcmd/gpo.py   | 110 +++
 python/samba/tests/samba_tool/gpo.py |  35 +++
 source4/librpc/ndr/py_misc.c |  24 
 source4/librpc/ndr/py_security.c |  24 
 8 files changed, 150 insertions(+), 138 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index 238a7550deb..7a95a58fa67 100644
--- a/lib/ldb/pyldb.c
+++ b/lib/ldb/pyldb.c
@@ -84,8 +84,6 @@ static struct ldb_message_element *PyObject_AsMessageElement(
  const char *attr_name);
 static PyTypeObject PyLdbBytesType;
 
-#if PY_MAJOR_VERSION >= 3
-
 #define PYARG_STR_UNI "es"
 
 static PyObject *PyLdbBytes_FromStringAndSize(const char *msg, int size)
@@ -97,12 

[SCM] Samba Shared Repository - branch master updated

2023-02-02 Thread Jeremy Allison
The branch, master has been updated
   via  851127f5c9a Python: remove pydoctor
   via  1dd0cd2f4e6 mdssvc: fix kMDScopeArray parsing
  from  d80f28b081e tevent: version 0.14.1

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


- Log -
commit 851127f5c9a56cb484008f3595099cbd9728b8c7
Author: Rob van der Linde 
Date:   Mon Jan 30 16:32:47 2023 +1300

Python: remove pydoctor

Removes:

* waf pydoctor
* waf wafdocs
* make pydoctor

There is no "make wafdocs" it only appears to be in wscript.

The reasoning being is these are broken and appear to not have been run for 
some time.

Signed-off-by: Rob van der Linde 
Reviewed-by: Andrew Bartlett 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Feb  2 21:15:54 UTC 2023 on atb-devel-224

commit 1dd0cd2f4e644ad43b0e7ee2aaae19799e859585
Author: Ralph Boehme 
Date:   Wed Jan 18 16:21:16 2023 +0100

mdssvc: fix kMDScopeArray parsing

In macOS Ventura marshalling of kMDScopeArray in the "openQueryWithParams"
request has changed from

  string: kMDScopeArray
  sl_array_t(#1): {
string: /foo/bar
  }

to:

  string: kMDScopeArray
  sl_array_t(#1): {
sl_array_t(#1): {
  string: /foo/bar
}
  }

With this patch we check both encodings. Bug fixed according to user 
feedback.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15299
RN: Spotlight doesn't work with latest macOS Ventura

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 

---

Summary of changes:
 Makefile   |  3 ---
 ctdb/Makefile  |  3 ---
 lib/talloc/Makefile|  3 ---
 lib/talloc/wscript |  7 ---
 lib/tdb/Makefile   |  3 ---
 source3/rpc_server/mdssvc/mdssvc.c |  6 ++
 wscript| 37 -
 7 files changed, 6 insertions(+), 56 deletions(-)


Changeset truncated at 500 lines:

diff --git a/Makefile b/Makefile
index 7f5960d5191..ec571050a09 100644
--- a/Makefile
+++ b/Makefile
@@ -97,9 +97,6 @@ etags:
 ctags:
$(WAF) ctags
 
-pydoctor:
-   $(WAF) pydoctor
-
 pep8:
$(WAF) pep8
 
diff --git a/ctdb/Makefile b/ctdb/Makefile
index 5dbc7acdc54..94113fe3adf 100644
--- a/ctdb/Makefile
+++ b/ctdb/Makefile
@@ -75,9 +75,6 @@ ctags:
touch .tmplock
WAFLOCK=.tmplock $(WAF) ctags
 
-pydoctor:
-   $(WAF) pydoctor
-
 bin/%:: FORCE
$(WAF) --targets=`basename $@`
 FORCE:
diff --git a/lib/talloc/Makefile b/lib/talloc/Makefile
index db2275c7397..ff8e585f2a9 100644
--- a/lib/talloc/Makefile
+++ b/lib/talloc/Makefile
@@ -60,9 +60,6 @@ etags:
 ctags:
$(WAF) ctags
 
-pydoctor:
-   $(WAF) pydoctor
-
 bin/%:: FORCE
$(WAF) --targets=`basename $@`
 FORCE:
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index 1c54a7c653a..503295eeceb 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -190,10 +190,3 @@ def dist():
 def reconfigure(ctx):
 '''reconfigure if config scripts have changed'''
 samba_utils.reconfigure(ctx)
-
-
-def pydoctor(ctx):
-'''build python apidocs'''
-cmd='PYTHONPATH=bin/python pydoctor --project-name=talloc 
--project-url=http://talloc.samba.org/ --make-html --docformat=restructuredtext 
--introspect-c-modules --add-module bin/python/talloc.*'
-print("Running: %s" % cmd)
-os.system(cmd)
diff --git a/lib/tdb/Makefile b/lib/tdb/Makefile
index 8fd56c814ec..55e229bcbf1 100644
--- a/lib/tdb/Makefile
+++ b/lib/tdb/Makefile
@@ -60,9 +60,6 @@ etags:
 ctags:
$(WAF) ctags
 
-pydoctor:
-   $(WAF) pydoctor
-
 bin/%:: FORCE
$(WAF) --targets=`basename $@`
 FORCE:
diff --git a/source3/rpc_server/mdssvc/mdssvc.c 
b/source3/rpc_server/mdssvc/mdssvc.c
index 01713722126..9b32c99b8b3 100644
--- a/source3/rpc_server/mdssvc/mdssvc.c
+++ b/source3/rpc_server/mdssvc/mdssvc.c
@@ -919,6 +919,12 @@ static bool slrpc_open_query(struct mds_ctx *mds_ctx,
 
scope = dalloc_get(path_scope, "char *", 0);
if (scope == NULL) {
+   scope = dalloc_get(path_scope,
+  "DALLOC_CTX", 0,
+  "char *", 0);
+   }
+   if (scope == NULL) {
+   DBG_ERR("Failed to parse kMDScopeArray\n");
goto error;
}
 
diff --git a/wscript b/wscript
index 08995fbe4ec..7396e09c294 100644
--- a/wscript
+++ b/wscript
@@ -465,28 +465,6 @@ def build(bld):
 samba_version.load_version(env=bld.env, is_install=bld.is_install)
 
 
-def pydoctor(ctx):
-'''build python apidocs'''
-bp = os.path.abspath('bin/python')
-mpaths = {}
-modules = ['talloc', 'tdb', 'ldb']
-for m in 

[SCM] Samba Shared Repository - branch master updated

2023-02-02 Thread Jeremy Allison
The branch, master has been updated
   via  d80f28b081e tevent: version 0.14.1
   via  ae77854a440 tevent: remove the already removed tevent_port.c also 
from the build
   via  488aa227584 replace: remove unused configure checks for 
port_create()
   via  15b1afc9175 replace: provide PIPE_BUF on GNU/Hurd
  from  65e9b409a6c s3:utils: Fix UNUSED_VALUE

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


- Log -
commit d80f28b081e515e32a480daf80b42cf782447a9c
Author: Stefan Metzmacher 
Date:   Wed Feb 1 15:31:32 2023 +

tevent: version 0.14.1

- Build fix for GNU/Hurd
- Build fix for Solaris, after removal
  of ports backend (bug #15298)

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Feb  2 18:27:08 UTC 2023 on atb-devel-224

commit ae77854a44094df6c9291271504c9733e717674f
Author: Stefan Metzmacher 
Date:   Wed Feb 1 13:31:38 2023 +

tevent: remove the already removed tevent_port.c also from the build

This fixes a regression introduced by 
147a317b7b92e60c5940d875dbd7aef19824834e.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 

commit 488aa2275847162755dcbfc75cb2549299aa2aeb
Author: Stefan Metzmacher 
Date:   Wed Feb 1 13:33:42 2023 +

replace: remove unused configure checks for port_create()

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 

commit 15b1afc9175e045b3b28523309fb3b28a3fab484
Author: Samuel Thibault 
Date:   Sun Aug 2 18:01:05 2020 +

replace: provide PIPE_BUF on GNU/Hurd

There is no hardcoded PIPE_BUF pipe limitation on GNU/Hurd, but POSIX
provides a minimum value that we can use.

Signed-off-by: Samuel Thibault 
Reviewed-by: Andrew Bartlett 
Reviewed-by: Stefan Metzmacher 

---

Summary of changes:
 lib/replace/system/network.h  | 12 
 lib/replace/system/select.h   |  4 
 lib/replace/wscript   |  5 -
 lib/tevent/ABI/{tevent-0.14.0.sigs => tevent-0.14.1.sigs} |  0
 lib/tevent/wscript|  5 +
 5 files changed, 13 insertions(+), 13 deletions(-)
 copy lib/tevent/ABI/{tevent-0.14.0.sigs => tevent-0.14.1.sigs} (100%)


Changeset truncated at 500 lines:

diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h
index a84bfd453b1..1721d65a51a 100644
--- a/lib/replace/system/network.h
+++ b/lib/replace/system/network.h
@@ -91,6 +91,8 @@
 #include 
 #endif
 
+#include 
+
 #ifndef HAVE_SOCKLEN_T
 #define HAVE_SOCKLEN_T
 typedef int socklen_t;
@@ -342,6 +344,16 @@ typedef unsigned short int sa_family_t;
 # endif
 #endif
 
+#ifndef PIPE_BUF
+# ifdef __GNU__
+  /*
+   * GNU/Hurd does not have such hardcoded limitations. But it has to support
+   * the minimum POSIX value anyway.
+   */
+#  define PIPE_BUF 512
+# endif
+#endif
+
 #ifndef HAVE_STRUCT_ADDRINFO
 #define HAVE_STRUCT_ADDRINFO
 struct addrinfo {
diff --git a/lib/replace/system/select.h b/lib/replace/system/select.h
index 9e945c3ccfa..11c5390d901 100644
--- a/lib/replace/system/select.h
+++ b/lib/replace/system/select.h
@@ -34,10 +34,6 @@
 #include 
 #endif
 
-#ifdef HAVE_SOLARIS_PORTS
-#include 
-#endif
-
 #ifndef SELECT_CAST
 #define SELECT_CAST
 #endif
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 82c5a8a477b..5c2b750832b 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -44,7 +44,6 @@ def configure(conf):
 conf.CHECK_HEADERS('locale.h ndir.h pwd.h')
 conf.CHECK_HEADERS('shadow.h sys/acl.h')
 conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h 
sys/dir.h sys/epoll.h')
-conf.CHECK_HEADERS('port.h')
 conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h')
 conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h 
sys/ndir.h sys/priv.h')
 conf.CHECK_HEADERS('sys/resource.h sys/security.h sys/shm.h sys/statfs.h 
sys/statvfs.h sys/termio.h')
@@ -482,7 +481,6 @@ def configure(conf):
 conf.CHECK_FUNCS('timegm getifaddrs freeifaddrs mmap setgroups syscall 
setsid')
 conf.CHECK_FUNCS('getgrent_r getgrgid_r getgrnam_r getgrouplist 
getpagesize')
 conf.CHECK_FUNCS('getpwent_r getpwnam_r getpwuid_r epoll_create')
-conf.CHECK_FUNCS('port_create')
 conf.CHECK_FUNCS('getprogname')
 if not conf.CHECK_FUNCS('copy_file_range'):
 conf.CHECK_CODE('''
@@ -708,9 +706,6 @@ syscall(SYS_copy_file_range,0,NULL,0,NULL,0,0);
 if conf.CONFIG_SET('HAVE_EPOLL_CREATE') and 
conf.CONFIG_SET('HAVE_SYS_EPOLL_H'):
 

[SCM] Samba Shared Repository - branch master updated

2023-02-02 Thread Ralph Böhme
The branch, master has been updated
   via  65e9b409a6c s3:utils: Fix UNUSED_VALUE
   via  4d83e9fcbda s3:utils: Fix trailing whitespaces
  from  0f2978bbc0e s4-drsuapi: Give an error that matches windows on 
destination_dsa_guid lookup failure

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


- Log -
commit 65e9b409a6c27bbdf80307514523b3f37f20859d
Author: Pavel Filipenský 
Date:   Thu Feb 2 09:49:31 2023 +0100

s3:utils: Fix UNUSED_VALUE

Reported by RedHat internal Covscan

Since cb8a0d9 we no longer stop traversing the list if encryption_flag
or signing_flags are unknown.

Assignment "result = -1;" is always overwritten by
"result = traverse_connections_*()" and is a dead code.

Signed-off-by: Pavel Filipenský 
Reviewed-by: Ralph Boehme 

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Thu Feb  2 15:46:52 UTC 2023 on atb-devel-224

commit 4d83e9fcbda34b45a55fdc25da4642e1d7839c7b
Author: Pavel Filipenský 
Date:   Thu Feb 2 09:48:37 2023 +0100

s3:utils: Fix trailing whitespaces

Signed-off-by: Pavel Filipenský 
Reviewed-by: Ralph Boehme 

---

Summary of changes:
 source3/utils/status.c | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/status.c b/source3/utils/status.c
index cca8b7d6cb2..5359dda90cc 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -1,4 +1,4 @@
-/* 
+/*
Unix SMB/CIFS implementation.
status reporting
Copyright (C) Andrew Tridgell 1994-1998
@@ -86,10 +86,10 @@ static void Ucrit_addUid(uid_t uid)
 
 static unsigned int Ucrit_checkUid(uid_t uid)
 {
-   if ( !Ucrit_IsActive ) 
+   if ( !Ucrit_IsActive )
return 1;
 
-   if ( uid == Ucrit_uid ) 
+   if ( uid == Ucrit_uid )
return 1;
 
return 0;
@@ -99,7 +99,7 @@ static unsigned int Ucrit_checkPid(struct server_id pid)
 {
int i;
 
-   if ( !Ucrit_IsActive ) 
+   if ( !Ucrit_IsActive )
return 1;
 
for (i=0;i