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

Jule Anger janger at samba.org
Sun Feb 27 17:35:02 UTC 2022


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 <bj at sernet.de>
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 <bj at sernet.de>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    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 <janger at samba.org>
    Autobuild-Date(v4-15-test): Sun Feb 27 17:34:42 UTC 2022 on sn-devel-184

commit 7ce02fab320cb4d107b502a2a4e7a7e9b6e47006
Author: Björn Jacke <bj at sernet.de>
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 <bj at sernet.de>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit e225ab70db0cc01454d319eaca5265d7e33f396c)

commit 0128222daf042591e1045387d56bbb62ff73a316
Author: Bjoern Jacke <bj at sernet.de>
Date:   Fri Feb 11 00:45:00 2022 +0000

    vfs_aixacl: add proper header file
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=7239
    
    Signed-off-by: Bjoern Jacke <bjacke at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 396c17160c19c6df43123074bf62268c6ed0f9e4)

commit 1507981e02791f5ded15321bb04d8c2f0aa00109
Author: Björn Jacke <bj at sernet.de>
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 <bjacke at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 89e903985b6968c5becc69b757b23144b1aba66e)

commit ea5edbbe83f09e8282ee0efcc45f4fb92394b37f
Author: Björn Jacke <bj at sernet.de>
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 <bjacke at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (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 <abartlet at samba.org> 2017
+   Copyright (C) Bjoern Jacke <bjacke at samba.org> 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 <http://www.gnu.org/licenses/>.
 */
 
-#ifndef __AUTH_AUTH_UTIL_H__
-#define __AUTH_AUTH_UTIL_H__
+#ifndef __VFS_AIXACL_H__
+#define __VFS_AIXACL_H__
+
+SMB_ACL_T aixacl_sys_acl_get_fd(vfs_handle_struct *handle,
+                                files_struct *fsp,
+                                SMB_ACL_TYPE_T type,
+                                TALLOC_CTX *mem_ctx);
 
-#include "replace.h"
-#include <talloc.h>
-#include "librpc/gen_ndr/auth.h"
+int aixacl_sys_acl_set_fd(vfs_handle_struct *handle,
+				 files_struct *fsp,
+				 SMB_ACL_TYPE_T type,
+				 SMB_ACL_T acl_d);
 
-struct auth_session_info *copy_session_info(
-	TALLOC_CTX *mem_ctx,
-	const struct auth_session_info *src);
+int aixacl_sys_acl_delete_def_fd(vfs_handle_struct *handle,
+                                 files_struct *fsp);
 
 #endif
diff --git a/source3/modules/vfs_solarisacl.h b/source3/modules/vfs_solarisacl.h
index f914304fd24..54d538c25a8 100644
--- a/source3/modules/vfs_solarisacl.h
+++ b/source3/modules/vfs_solarisacl.h
@@ -27,6 +27,7 @@ SMB_ACL_T solarisacl_sys_acl_get_file(vfs_handle_struct *handle,
 
 SMB_ACL_T solarisacl_sys_acl_get_fd(vfs_handle_struct *handle,
 				    files_struct *fsp, 
+				    SMB_ACL_TYPE_T type,
 				    TALLOC_CTX *mem_ctx);
 
 int solarisacl_sys_acl_set_fd(vfs_handle_struct *handle,
diff --git a/source3/wscript b/source3/wscript
index 2cc34a8b2f5..8ec9ed1d9b9 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -500,11 +500,11 @@ vsyslog
                 Logs.info('Using HPUX ACLs')
                 conf.DEFINE('HAVE_HPUX_ACLS',1)
                 conf.DEFINE('POSIX_ACL_NEEDS_MASK',1)
-                default_static_modules.extend(['vfs_hpuxacl'])
+                required_static_modules.extend(['vfs_hpuxacl'])
         elif (host_os.rfind('aix') > -1):
                 Logs.info('Using AIX ACLs')
                 conf.DEFINE('HAVE_AIX_ACLS',1)
-                default_static_modules.extend(['vfs_aixacl', 'vfs_aixacl2'])
+                required_static_modules.extend(['vfs_aixacl', 'vfs_aixacl2'])
         elif (host_os.rfind('darwin') > -1):
             Logs.warn('ACLs on Darwin currently not supported')
             conf.fatal("ACL support not available on Darwin/MacOS. "
@@ -537,7 +537,7 @@ return acl_get_perm_np(permset_d, perm);
             elif conf.CHECK_FUNCS_IN(['facl'], 'sec'):
                 Logs.info('Using solaris or UnixWare ACLs')
                 conf.DEFINE('HAVE_SOLARIS_UNIXWARE_ACLS',1)
-                default_static_modules.extend(['vfs_solarisacl'])
+                required_static_modules.extend(['vfs_solarisacl'])
             else:
                 conf.fatal("ACL support not found. Try installing libacl1-dev "
                            "or libacl-devel.  "
@@ -1389,6 +1389,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 <unistd.h>
@@ -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



More information about the samba-cvs mailing list