[SCM] Samba Shared Repository - branch master updated

2023-01-19 Thread Jeremy Allison
The branch, master has been updated
   via  91f1567cdca s3:rpc_server/mdssvc: don't crash 
mdssvc_tracker_shutdown with NULL glue
   via  370b777202b s3:auth: call wbcFreeMemory(info) in 
auth3_generate_session_info_pac()
  from  fcecdfa8e5c s4:dnsserver: Rename dns_name_equal() to 
samba_dns_name_equal()

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


- Log -
commit 91f1567cdcaed3a8f8faf4e77616553308a5f8eb
Author: Stefan Metzmacher 
Date:   Wed Jan 11 23:48:11 2023 +0100

s3:rpc_server/mdssvc: don't crash mdssvc_tracker_shutdown with NULL glue

If mdssvc_tracker_shutdown() is called without any mds_tracker_connect()
we would crash as mdssvc_tracker_init() don't call
mdssvc_tracker_prepare().

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

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Jan 19 19:46:01 UTC 2023 on atb-devel-224

commit 370b777202bbd9730209a3e18de102b4f163f18d
Author: Stefan Metzmacher 
Date:   Thu Dec 16 18:24:16 2021 +0100

s3:auth: call wbcFreeMemory(info) in auth3_generate_session_info_pac()

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

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

---

Summary of changes:
 source3/auth/auth_generic.c|  1 +
 source3/rpc_server/mdssvc/mdssvc_tracker.c | 12 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/auth_generic.c b/source3/auth/auth_generic.c
index ff51307e43a..6c61eb4e827 100644
--- a/source3/auth/auth_generic.c
+++ b/source3/auth/auth_generic.c
@@ -143,6 +143,7 @@ static NTSTATUS auth3_generate_session_info_pac(struct 
auth4_context *auth_ctx,
  info->account_name,
  info->domain_name,
  info, _info);
+   wbcFreeMemory(info);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("make_server_info_wbcAuthUserInfo failed: 
%s\n",
   nt_errstr(status)));
diff --git a/source3/rpc_server/mdssvc/mdssvc_tracker.c 
b/source3/rpc_server/mdssvc/mdssvc_tracker.c
index fab8bd22324..7ad6989fd25 100644
--- a/source3/rpc_server/mdssvc/mdssvc_tracker.c
+++ b/source3/rpc_server/mdssvc/mdssvc_tracker.c
@@ -286,7 +286,6 @@ static bool mdssvc_tracker_prepare(void)
mdssvc_tracker_ctx->gmain_ctx = g_main_context_new();
if (mdssvc_tracker_ctx->gmain_ctx == NULL) {
DBG_ERR("error from g_main_context_new\n");
-   TALLOC_FREE(mdssvc_tracker_ctx);
return false;
}
 
@@ -297,7 +296,7 @@ static bool mdssvc_tracker_prepare(void)
if (mdssvc_tracker_ctx->glue == NULL) {
DBG_ERR("samba_tevent_glib_glue_create failed\n");
g_object_unref(mdssvc_tracker_ctx->gmain_ctx);
-   TALLOC_FREE(mdssvc_tracker_ctx);
+   mdssvc_tracker_ctx->gmain_ctx = NULL;
return false;
}
 
@@ -306,10 +305,19 @@ static bool mdssvc_tracker_prepare(void)
 
 static bool mdssvc_tracker_shutdown(struct mdssvc_ctx *mdssvc_ctx)
 {
+   if (mdssvc_tracker_ctx == NULL) {
+   return true;
+   }
+
+   if (mdssvc_tracker_ctx->gmain_ctx == NULL) {
+   return true;
+   }
+
samba_tevent_glib_glue_quit(mdssvc_tracker_ctx->glue);
TALLOC_FREE(mdssvc_tracker_ctx->glue);
 
g_object_unref(mdssvc_tracker_ctx->gmain_ctx);
+   mdssvc_tracker_ctx->gmain_ctx = NULL;
return true;
 }
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch v4-18-test updated

2023-01-19 Thread Stefan Metzmacher
The branch, v4-18-test has been updated
   via  1886a72d966 VERSION: Bump version up to 4.18.0rc2...
  from  fbba9a24796 VERSION: Disable GIT_SNAPSHOT for the Samba 4.18.0rc1 
release.

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-18-test


- Log -
commit 1886a72d966dba78246fff8ee465b02384214b01
Author: Stefan Metzmacher 
Date:   Thu Jan 19 13:43:44 2023 +0100

VERSION: Bump version up to 4.18.0rc2...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Stefan Metzmacher 

Autobuild-User(v4-18-test): Stefan Metzmacher 
Autobuild-Date(v4-18-test): Thu Jan 19 14:33:06 UTC 2023 on atb-devel-224

---

Summary of changes:
 VERSION | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 97e56c10a35..e7078e58136 100644
--- a/VERSION
+++ b/VERSION
@@ -87,7 +87,7 @@ SAMBA_VERSION_PRE_RELEASE=
 # e.g. SAMBA_VERSION_RC_RELEASE=1  #
 #  ->  "3.0.0rc1"  #
 
-SAMBA_VERSION_RC_RELEASE=1
+SAMBA_VERSION_RC_RELEASE=2
 
 
 # To mark SVN snapshots this should be set to 'yes'#
@@ -99,7 +99,7 @@ SAMBA_VERSION_RC_RELEASE=1
 # e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes   #
 #  ->  "3.0.0-SVN-build-199"   #
 
-SAMBA_VERSION_IS_GIT_SNAPSHOT=no
+SAMBA_VERSION_IS_GIT_SNAPSHOT=yes
 
 
 # This is for specifying a release nickname#


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2023-01-19 Thread Samuel Cabrero
The branch, master has been updated
   via  fcecdfa8e5c s4:dnsserver: Rename dns_name_equal() to 
samba_dns_name_equal()
  from  872ea49ac6d kdc: Don't reference ENODATA in platform-independent 
code

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


- Log -
commit fcecdfa8e5c651d4a27f8fcd5df6e9bce37ed8a7
Author: Samuel Cabrero 
Date:   Wed Jan 18 17:25:29 2023 +0100

s4:dnsserver: Rename dns_name_equal() to samba_dns_name_equal()

This function already exists in bind9 but takes different arguments, so when
the DLZ is loaded and this function is called bind crashes:

  named[1523]: samba_dlz: allowing update of 
signer=DESKTOP-8BUKMBK\$\@AFOREST.AD name=118.101.168.192.in-addr.arpa 
tcpaddr=192.168.101.118  type=PTR 
key=1264-ms-7.1-2ac9.9ef238e1-9747-11ed-9f95-525400dc6981/159/0
  named[1523]: samba_dlz: allowing update of 
signer=DESKTOP-8BUKMBK\$\@AFOREST.AD name=118.101.168.192.in-addr.arpa 
tcpaddr=192.168.101.118  type=PTR 
key=1264-ms-7.1-2ac9.9ef238e1-9747-11ed-9f95-525400dc6981/159/0
  named[1523]: client @0x7f26caa90f68 192.168.101.118#58223/key 
DESKTOP-8BUKMBK\$\@AFOREST.AD: updating zone '101.168.192.in-addr.arpa/NONE': 
deleting rrset at '118.101.168.192.in-addr.ar
  named[1523]: name.c:664: REQUIRE(((name1) != ((void *)0) && ((const 
isc__magic_t *)(name1))->magic == ((('D') << 24 | ('N') << 16 | ('S') << 8 | 
('n') failed, back trace

Backtrace:

  #0  0x7f2716c957ec in __pthread_kill_implementation () from 
/lib64/libc.so.6
  #1  0x7f2716c42816 in raise () from /lib64/libc.so.6
  #2  0x7f2716c2b81c in abort () from /lib64/libc.so.6
  #3  0x55d4de847995 in assertion_failed (file=, 
line=,
  type=, cond=) at 
/usr/src/debug/bind-9.18.10/bin/named/main.c:237
  #4  0x7f27176388fc in isc_assertion_failed 
(file=file@entry=0x7f27173b0df6 "name.c",
  line=line@entry=664, type=type@entry=isc_assertiontype_require,
  cond=cond@entry=0x7f27173b0268 "((name1) != ((void *)0) && ((const 
isc__magic_t *)(name1))->magic == ((('D') << 24 | ('N') << 16 | ('S') << 8 | 
('n'")
  at /usr/src/debug/bind-9.18.10/lib/isc/assertions.c:48
  #5  0x7f27172946f9 in dns_name_equal (name1=, 
name2=)
  at /usr/src/debug/bind-9.18.10/lib/dns/name.c:664

   Here bind's dns_name_equal() is called instead of samba's 
dns_name_equal() 

  #6  0x7f27077ad6f2 in dns_record_match (rec1=0x7f26f8042d70, 
rec2=0x7f26f8044d10)
  at ../../source4/dns_server/dnsserver_common.c:1346
  #7  0x7f271404732c in b9_record_match (rec1=0x7f26f8042d70, 
rec2=0x7f26f8044d10)
  at ../../source4/dns_server/dlz_bind9.c:1830
  #8  0x7f2714047daa in dlz_subrdataset (name=0x7f2706ff82f0 
"118.101.168.192.in-addr.arpa",
  rdatastr=0x7f26c9c1 
"118.101.168.192.in-addr.arpa.\t1200\tIN\tPTR\tDESKTOP-8BUKMBK.aforest.ad.",
  dbdata=0x7f271003d300, version=0x7f26f8044b20) at 
../../source4/dns_server/dlz_bind9.c:2077
  #9  0x55d4de84afb4 in dlopen_dlz_subrdataset (name=0x7f2706ff82f0 
"118.101.168.192.in-addr.arpa",
  rdatastr=, driverarg=, 
dbdata=0x7f270430f680, version=)
  at /usr/src/debug/bind-9.18.10/bin/named/dlz_dlopen_driver.c:483
  #10 0x7f271738e734 in modrdataset.constprop.0 (db=0x7f2704291740, 
node=0x7f26c9c006e0,
  version=0x7f26f8044b20, rdataset=0x7f2706ff8830,
  mod_function=0x55d4de84af80 , 
options=)
  at /usr/src/debug/bind-9.18.10/lib/dns/sdlz.c:1107
  #11 0x7f2717251855 in diff_apply (diff=diff@entry=0x7f2706ff8df0, 
db=db@entry=0x7f2704291740,
  ver=ver@entry=0x7f26f8044b20, warn=warn@entry=true) at 
/usr/src/debug/bind-9.18.10/lib/dns/diff.c:370
  #12 0x7f2717251c8a in dns_diff_apply (diff=diff@entry=0x7f2706ff8df0, 
db=db@entry=0x7f2704291740,
  ver=ver@entry=0x7f26f8044b20) at 
/usr/src/debug/bind-9.18.10/lib/dns/diff.c:465
  #13 0x7f2717d105aa in do_one_tuple (tuple=tuple@entry=0x7f2706ff8e50, 
db=db@entry=0x7f2704291740,
  ver=ver@entry=0x7f26f8044b20, diff=diff@entry=0x7f2706ff9400)
  at /usr/src/debug/bind-9.18.10/lib/ns/update.c:454
  #14 0x7f2717d10fff in update_one_rr (rdata=0x7f2706ff8ee8, 
ttl=,
  name=, op=DNS_DIFFOP_DEL, diff=0x7f2706ff9400, 
ver=0x7f26f8044b20, db=0x7f2704291740)
  at /usr/src/debug/bind-9.18.10/lib/ns/update.c:505
  #15 delete_if_action (data=, rr=0x7f2706ff8ee0)
  at /usr/src/debug/bind-9.18.10/lib/ns/update.c:1427
  #16 0x7f2717d10ccd in foreach_rr (db=0x7f2704291740, ver=, name=0x7f26caa61d00,
  type=, covers=,
  rr_action=rr_action@entry=0x7f2717d10f60 , 
rr_action_data=0x7f2706ff9280)
  at /usr/src/debug/bind-9.18.10/lib/ns/update.c:736
  #17 0x7f2717d10e76 in delete_if 
(predicate=predicate@entry=0x7f2717d0fb10 ,

[SCM] Samba Shared Repository - branch master updated

2023-01-19 Thread Volker Lendecke
The branch, master has been updated
   via  872ea49ac6d kdc: Don't reference ENODATA in platform-independent 
code
  from  84f56f2b98b ldb: change the version to 2.8.0 for Samba 4.19

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


- Log -
commit 872ea49ac6dced44f114f80b7065017a381f46d7
Author: Volker Lendecke 
Date:   Wed Jan 18 11:49:00 2023 +0100

kdc: Don't reference ENODATA in platform-independent code

FreeBSD has ENOATTR but not ENODATA, Linux has ENODATA but not ENOATTR for
returning "attr does not exist". With 2eb899de6a2 we settled on ENOATTR to
handle this case.

Alternatively we could

 #define ENODATA ENOATTR

on FreeBSD...

Signed-off-by: Volker Lendecke 
Reviewed-by: douglas.bagn...@catalyst.net.nz

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Thu Jan 19 09:24:15 UTC 2023 on atb-devel-224

---

Summary of changes:
 source4/kdc/mit_samba.c  | 5 +++--
 source4/kdc/pac-glue.c   | 7 ---
 source4/kdc/wdc-samba4.c | 3 ++-
 3 files changed, 9 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/kdc/mit_samba.c b/source4/kdc/mit_samba.c
index 54d308d35e8..8df3ad36228 100644
--- a/source4/kdc/mit_samba.c
+++ b/source4/kdc/mit_samba.c
@@ -25,6 +25,7 @@
 #include "param/param.h"
 #include "dsdb/samdb/samdb.h"
 #include "system/kerberos.h"
+#include "lib/replace/system/filesys.h"
 #include 
 #include 
 #include 
@@ -640,7 +641,7 @@ krb5_error_code mit_samba_reget_pac(struct 
mit_samba_context *ctx,
new_pac);
if (code != 0) {
krb5_pac_free(context, new_pac);
-   if (code == ENODATA) {
+   if (code == ENOATTR) {
krb5_pac_free(context, *pac);
*pac = NULL;
code = 0;
@@ -740,7 +741,7 @@ krb5_error_code mit_samba_update_pac(struct 
mit_samba_context *ctx,
old_pac,
new_pac);
if (code != 0) {
-   if (code == ENODATA) {
+   if (code == ENOATTR) {
/*
 * We can't tell the KDC to not issue a PAC. It will
 * just return the newly allocated empty PAC.
diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c
index f844b08d513..e9b951ff48e 100644
--- a/source4/kdc/pac-glue.c
+++ b/source4/kdc/pac-glue.c
@@ -23,6 +23,7 @@
 
 #include "lib/replace/replace.h"
 #include "lib/replace/system/kerberos.h"
+#include "lib/replace/system/filesys.h"
 #include "lib/util/debug.h"
 #include "lib/util/samba_util.h"
 #include "lib/util/talloc_stack.h"
@@ -1401,7 +1402,7 @@ WERROR samba_rodc_confirm_user_is_allowed(uint32_t 
num_object_sids,
  * @param new_pac   The new already allocated PAC
 
  * @return A Kerberos error code. If no PAC should be returned, the code will 
be
- * ENODATA!
+ * ENOATTR!
  */
 krb5_error_code samba_kdc_update_pac(TALLOC_CTX *mem_ctx,
 krb5_context context,
@@ -1756,7 +1757,7 @@ krb5_error_code samba_kdc_update_pac(TALLOC_CTX *mem_ctx,
 * need to re-generate anything anyway.
 */
if (!samba_princ_needs_pac(server)) {
-   code = ENODATA;
+   code = ENOATTR;
goto done;
}
 
@@ -1779,7 +1780,7 @@ krb5_error_code samba_kdc_update_pac(TALLOC_CTX *mem_ctx,
  _pac);
if (code != 0 || !requested_pac) {
if (!requested_pac) {
-   code = ENODATA;
+   code = ENOATTR;
}
goto done;
}
diff --git a/source4/kdc/wdc-samba4.c b/source4/kdc/wdc-samba4.c
index 1c10f13972f..f3ca04550b0 100644
--- a/source4/kdc/wdc-samba4.c
+++ b/source4/kdc/wdc-samba4.c
@@ -29,6 +29,7 @@
 #include "sdb_hdb.h"
 #include "librpc/gen_ndr/auth.h"
 #include 
+#include "lib/replace/system/filesys.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_KERBEROS
@@ -361,7 +362,7 @@ static krb5_error_code samba_wdc_reget_pac2(astgs_request_t 
r,
   new_pac);
if (ret != 0) {
krb5_pac_free(context, new_pac);
-   if (ret == ENODATA) {
+   if (ret == ENOATTR) {
krb5_pac_free(context, *pac);
*pac = NULL;
ret = 0;


-- 
Samba Shared Repository