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

2022-02-27 Thread Jule Anger
The branch, v4-16-test has been updated
   via  2d87ade08a6 waf: re-add missing readlink test
   via  76463193044 readlink test: inverse return code
   via  e82833a1078 vfs_aixacl: add proper header file
   via  821e16c077c wscript: s/default/required/ _static_modules for the 
acl modules
   via  9016cb5c643 acl: fix function arguments for AIX' and Solaris' 
sys_acl_get_fd()
  from  4346dac73a4 s3:winbind: Use the canonical principal name to renew 
the credentials

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


- Log -
commit 2d87ade08a6f03e34428c8ff0793be8f1552b685
Author: Björn Jacke 
Date:   Wed Dec 26 01:03:29 2018 +0100

waf: re-add missing readlink test

this was another portability regression that came with the moving to waf

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Fri Feb 18 23:12:51 UTC 2022 on sn-devel-184

(cherry picked from commit 45cb14ac80889ac913f7f76dbfaebcb4d5ee14fd)

Autobuild-User(v4-16-test): Jule Anger 
Autobuild-Date(v4-16-test): Sun Feb 27 20:03:27 UTC 2022 on sn-devel-184

commit 76463193044cdbcf96a7199fa4bf4ef45a5b2513
Author: Björn Jacke 
Date:   Wed Dec 26 01:01:14 2018 +0100

readlink test: inverse return code

We need to return 0 in case readlink is *broken* here - this is because our 
waf
CHECK_CODE function does only allow generating defines in case the test 
succeeds

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit e225ab70db0cc01454d319eaca5265d7e33f396c)

commit e82833a107834cdfaef72e5a2c805a780ef2cba5
Author: Bjoern Jacke 
Date:   Fri Feb 11 00:45:00 2022 +

vfs_aixacl: add proper header file

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 396c17160c19c6df43123074bf62268c6ed0f9e4)

commit 821e16c077c98ea4d792a4a788be68c2fbb21264
Author: Björn Jacke 
Date:   Tue Feb 15 14:25:41 2022 +0100

wscript: s/default/required/ _static_modules for the acl modules

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 89e903985b6968c5becc69b757b23144b1aba66e)

commit 9016cb5c64351ff267d8deb43451370d6dcbba64
Author: Björn Jacke 
Date:   Fri Feb 11 03:38:31 2022 +0100

acl: fix function arguments for AIX' and Solaris' sys_acl_get_fd()

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 183ab5ced8377b63ad07d2e810396d3b414f4a7d)

---

Summary of changes:
 source3/lib/sysacls.c|  6 +-
 auth/auth_util.h => source3/modules/vfs_aixacl.h | 26 +---
 source3/modules/vfs_solarisacl.h |  1 +
 source3/wscript  | 12 ---
 tests/readlink.c | 11 ++
 5 files changed, 36 insertions(+), 20 deletions(-)
 copy auth/auth_util.h => source3/modules/vfs_aixacl.h (54%)


Changeset truncated at 500 lines:

diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c
index d42337190c3..891fabea21e 100644
--- a/source3/lib/sysacls.c
+++ b/source3/lib/sysacls.c
@@ -34,6 +34,10 @@
 #include "modules/vfs_hpuxacl.h"
 #endif
 
+#if defined(HAVE_AIX_ACLS)
+#include "modules/vfs_aixacl.h"
+#endif
+
 #undef  DBGC_CLASS
 #define DBGC_CLASS DBGC_ACLS
 
@@ -410,7 +414,7 @@ SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle,
 SMB_ACL_TYPE_T type,
 TALLOC_CTX *mem_ctx)
 {
-   return solarisacl_sys_acl_get_fd(handle, fsp,
+   return solarisacl_sys_acl_get_fd(handle, fsp, type,
 mem_ctx);
 }
 
diff --git a/auth/auth_util.h b/source3/modules/vfs_aixacl.h
similarity index 54%
copy from auth/auth_util.h
copy to source3/modules/vfs_aixacl.h
index 0af6ff5ec6c..f9fe3f85dc6 100644
--- a/auth/auth_util.h
+++ b/source3/modules/vfs_aixacl.h
@@ -1,8 +1,5 @@
 /*
-   Unix SMB/CIFS implementation.
-   Authentication utility functions
-
-   Copyright (C) Andrew Bartlett  2017
+   Copyright (C) Bjoern Jacke  2022
 
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
@@ -18,15 +15,20 @@
along with this program.  If not, see .
 */
 
-#ifndef __AUTH_AUTH_UTIL_H__
-#define __AUTH_AUTH_UTIL_H__
+#ifndef __VFS_AIXACL_H__
+#define 

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

2022-02-27 Thread Jule Anger
The branch, v4-14-test has been updated
   via  992a41e5e74 waf: re-add missing readlink test
   via  26911b1489d readlink test: inverse return code
  from  3d90f070894 s3:modules: Fix virusfilter_vfs_openat

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


- Log -
commit 992a41e5e74debc957105d2b50c6172ce93846a0
Author: Björn Jacke 
Date:   Wed Dec 26 01:03:29 2018 +0100

waf: re-add missing readlink test

this was another portability regression that came with the moving to waf

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Fri Feb 18 23:12:51 UTC 2022 on sn-devel-184

(cherry picked from commit 45cb14ac80889ac913f7f76dbfaebcb4d5ee14fd)

Autobuild-User(v4-14-test): Jule Anger 
Autobuild-Date(v4-14-test): Sun Feb 27 17:48:46 UTC 2022 on sn-devel-184

commit 26911b1489d6f6b73bfa60ac19d0c0cc4aedb745
Author: Björn Jacke 
Date:   Wed Dec 26 01:01:14 2018 +0100

readlink test: inverse return code

We need to return 0 in case readlink is *broken* here - this is because our 
waf
CHECK_CODE function does only allow generating defines in case the test 
succeeds

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit e225ab70db0cc01454d319eaca5265d7e33f396c)

---

Summary of changes:
 source3/wscript  |  6 ++
 tests/readlink.c | 11 +++
 2 files changed, 13 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/wscript b/source3/wscript
index adc31ce57b8..c94f78c6a06 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1406,6 +1406,12 @@ main() {
 addmain=False,
 execute=True)
 
+conf.CHECK_CODE('''#include "../tests/readlink.c"''',
+'HAVE_BROKEN_READLINK',
+msg='Checking for readlink breakage',
+addmain=False,
+execute=True)
+
 conf.SET_TARGET_TYPE('sendfile', 'EMPTY')
 conf.CHECK_LIB('sendfile')
 if not Options.options.with_sendfile_support == False:
diff --git a/tests/readlink.c b/tests/readlink.c
index 65311c2ff79..a09eba4af2b 100644
--- a/tests/readlink.c
+++ b/tests/readlink.c
@@ -1,4 +1,7 @@
-/* test whether readlink returns a short buffer correctly. */
+/* test whether readlink returns a short buffer incorrectly.
+   We need to return 0 in case readlink is *broken* here - this is because our 
waf
+   CHECK_CODE function does only allow generating defines in case the test 
succeeds
+*/
 
 #if defined(HAVE_UNISTD_H)
 #include 
@@ -20,14 +23,14 @@ int main(void)
unlink(FNAME);
ret = symlink(DATA, FNAME);
if (ret == -1) {
-   exit(1);
+   exit(0);
}
 
rl_ret = readlink(FNAME, buf, sizeof(buf));
if (rl_ret == -1) {
unlink(FNAME);
-   exit(1);
+   exit(0);
}
unlink(FNAME);
-   exit(0);
+   exit(1);
 }


-- 
Samba Shared Repository



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

2022-02-27 Thread Jule Anger
The branch, v4-15-test has been updated
   via  f7e31127e7f waf: re-add missing readlink test
   via  7ce02fab320 readlink test: inverse return code
   via  0128222daf0 vfs_aixacl: add proper header file
   via  1507981e027 wscript: s/default/required/ _static_modules for the 
acl modules
   via  ea5edbbe83f acl: fix function arguments for AIX' and Solaris' 
sys_acl_get_fd()
  from  4d91f6dafd1 s3:winbind: Use the canonical principal name to renew 
the credentials

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


- Log -
commit f7e31127e7f8beb12294c5187cca9e191589ddcc
Author: Björn Jacke 
Date:   Wed Dec 26 01:03:29 2018 +0100

waf: re-add missing readlink test

this was another portability regression that came with the moving to waf

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Fri Feb 18 23:12:51 UTC 2022 on sn-devel-184

(cherry picked from commit 45cb14ac80889ac913f7f76dbfaebcb4d5ee14fd)

Autobuild-User(v4-15-test): Jule Anger 
Autobuild-Date(v4-15-test): Sun Feb 27 17:34:42 UTC 2022 on sn-devel-184

commit 7ce02fab320cb4d107b502a2a4e7a7e9b6e47006
Author: Björn Jacke 
Date:   Wed Dec 26 01:01:14 2018 +0100

readlink test: inverse return code

We need to return 0 in case readlink is *broken* here - this is because our 
waf
CHECK_CODE function does only allow generating defines in case the test 
succeeds

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit e225ab70db0cc01454d319eaca5265d7e33f396c)

commit 0128222daf042591e1045387d56bbb62ff73a316
Author: Bjoern Jacke 
Date:   Fri Feb 11 00:45:00 2022 +

vfs_aixacl: add proper header file

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 396c17160c19c6df43123074bf62268c6ed0f9e4)

commit 1507981e02791f5ded15321bb04d8c2f0aa00109
Author: Björn Jacke 
Date:   Tue Feb 15 14:25:41 2022 +0100

wscript: s/default/required/ _static_modules for the acl modules

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 89e903985b6968c5becc69b757b23144b1aba66e)

commit ea5edbbe83f09e8282ee0efcc45f4fb92394b37f
Author: Björn Jacke 
Date:   Fri Feb 11 03:38:31 2022 +0100

acl: fix function arguments for AIX' and Solaris' sys_acl_get_fd()

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

Signed-off-by: Bjoern Jacke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 183ab5ced8377b63ad07d2e810396d3b414f4a7d)

---

Summary of changes:
 source3/lib/sysacls.c|  6 +-
 auth/auth_util.h => source3/modules/vfs_aixacl.h | 26 +---
 source3/modules/vfs_solarisacl.h |  1 +
 source3/wscript  | 12 ---
 tests/readlink.c | 11 ++
 5 files changed, 36 insertions(+), 20 deletions(-)
 copy auth/auth_util.h => source3/modules/vfs_aixacl.h (54%)


Changeset truncated at 500 lines:

diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c
index d42337190c3..891fabea21e 100644
--- a/source3/lib/sysacls.c
+++ b/source3/lib/sysacls.c
@@ -34,6 +34,10 @@
 #include "modules/vfs_hpuxacl.h"
 #endif
 
+#if defined(HAVE_AIX_ACLS)
+#include "modules/vfs_aixacl.h"
+#endif
+
 #undef  DBGC_CLASS
 #define DBGC_CLASS DBGC_ACLS
 
@@ -410,7 +414,7 @@ SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle,
 SMB_ACL_TYPE_T type,
 TALLOC_CTX *mem_ctx)
 {
-   return solarisacl_sys_acl_get_fd(handle, fsp,
+   return solarisacl_sys_acl_get_fd(handle, fsp, type,
 mem_ctx);
 }
 
diff --git a/auth/auth_util.h b/source3/modules/vfs_aixacl.h
similarity index 54%
copy from auth/auth_util.h
copy to source3/modules/vfs_aixacl.h
index 0af6ff5ec6c..f9fe3f85dc6 100644
--- a/auth/auth_util.h
+++ b/source3/modules/vfs_aixacl.h
@@ -1,8 +1,5 @@
 /*
-   Unix SMB/CIFS implementation.
-   Authentication utility functions
-
-   Copyright (C) Andrew Bartlett  2017
+   Copyright (C) Bjoern Jacke  2022
 
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
@@ -18,15 +15,20 @@
along with this program.  If not, see .
 */
 
-#ifndef __AUTH_AUTH_UTIL_H__
-#define __AUTH_AUTH_UTIL_H__
+#ifndef __VFS_AIXACL_H__
+#define 

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

2022-02-27 Thread Jule Anger
The branch, v4-15-test has been updated
   via  4d91f6dafd1 s3:winbind: Use the canonical principal name to renew 
the credentials
   via  d0d70d9f630 s3:winbind: Store canonical principal and realm in 
ccache entry
   via  29218c61b0a s3:libads: Return canonical principal and realm from 
kerberos_return_pac()
   via  66568436d27 lib:krb5_wrap: Fix wrong debug message and use newer 
debug macro
   via  696c3e46397 lib:krb5_wrap: Improve debug message and use newer 
debug macro
   via  4aa677729cc s3:libads: Fix memory leak in kerberos_return_pac() 
error path
  from  49779a9f86f docs-xml: Fix idmap_autorid documentation

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


- Log -
commit 4d91f6dafd164cee7118410232aef8e7a762da71
Author: Samuel Cabrero 
Date:   Tue Feb 22 14:28:44 2022 +0100

s3:winbind: Use the canonical principal name to renew the credentials

The principal name stored in the winbindd ccache entry might be an
enterprise principal name if enterprise principals are enabled. Use
the canonical name to renew the credentials.

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

Signed-off-by: Samuel Cabrero 
Reviewed-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 
(cherry picked from commit 8246ccc23d064147412bb3475e6431a9fffc0d27)

Autobuild-User(v4-15-test): Jule Anger 
Autobuild-Date(v4-15-test): Sun Feb 27 10:31:47 UTC 2022 on sn-devel-184

commit d0d70d9f6309c2779d6c912010ebd1a9ca571b87
Author: Samuel Cabrero 
Date:   Tue Feb 22 13:19:02 2022 +0100

s3:winbind: Store canonical principal and realm in ccache entry

They will be used later to refresh the tickets.

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

Signed-off-by: Samuel Cabrero 
Reviewed-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 
(cherry picked from commit 0f4f330773d272b4d28ff3ba5a41bdd4ba569c8b)

commit 29218c61b0ad240fa7c88f93a914063fb28f52e0
Author: Samuel Cabrero 
Date:   Tue Feb 22 13:08:56 2022 +0100

s3:libads: Return canonical principal and realm from kerberos_return_pac()

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

Signed-off-by: Samuel Cabrero 
Reviewed-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 
(cherry picked from commit 00b1f44a7e8f66976757535bcbc6bea97fb1c29f)

commit 66568436d2782c0504dffd7ab41f73ab5079a8f3
Author: Samuel Cabrero 
Date:   Tue Feb 22 14:28:28 2022 +0100

lib:krb5_wrap: Fix wrong debug message and use newer debug macro

Signed-off-by: Samuel Cabrero 
Reviewed-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 
(cherry picked from commit 1b5b4107a5081f15ba215f3025056d509fcfcf2a)

commit 696c3e46397284e2c2397ec25435c824183700a7
Author: Samuel Cabrero 
Date:   Tue Feb 22 13:00:05 2022 +0100

lib:krb5_wrap: Improve debug message and use newer debug macro

Signed-off-by: Samuel Cabrero 
Reviewed-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 
(cherry picked from commit ed14513be055cc56eb39785323df2c538a813865)

commit 4aa677729cc177ef9481430b2949312e0002e3fc
Author: Samuel Cabrero 
Date:   Tue Feb 22 12:59:44 2022 +0100

s3:libads: Fix memory leak in kerberos_return_pac() error path

Signed-off-by: Samuel Cabrero 
Reviewed-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 
(cherry picked from commit 3dbcd20de98cd28683a9c248368e5082b6388111)

---

Summary of changes:
 lib/krb5_wrap/krb5_samba.c |  7 +--
 source3/libads/authdata.c  | 33 +
 source3/libads/kerberos_proto.h|  2 ++
 source3/utils/net_ads.c|  2 ++
 source3/winbindd/winbindd.h|  2 ++
 source3/winbindd/winbindd_cred_cache.c | 18 --
 source3/winbindd/winbindd_pam.c| 12 ++--
 source3/winbindd/winbindd_proto.h  |  4 +++-
 8 files changed, 69 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c
index fff5b4e2a22..76c2dcd2126 100644
--- a/lib/krb5_wrap/krb5_samba.c
+++ b/lib/krb5_wrap/krb5_samba.c
@@ -1079,7 +1079,7 @@ krb5_error_code smb_krb5_renew_ticket(const char 
*ccache_string,
goto done;
}
 
-   DEBUG(10,("smb_krb5_renew_ticket: using %s as ccache\n", 
ccache_string));
+   DBG_DEBUG("Using %s as ccache for '%s'\n", ccache_string, 
client_string);
 
/* FIXME: we should not fall back to defaults */
ret = krb5_cc_resolve(context, discard_const_p(char, ccache_string), 
);
@@ -1101,7 +1101,10 @@ krb5_error_code smb_krb5_renew_ticket(const char 
*ccache_string,
 
ret = krb5_get_renewed_creds(context, , client, ccache, 
discard_const_p(char,