[SCM] Samba Shared Repository - branch v4-16-test updated
Jule Anger
janger at samba.org
Sun Feb 27 20:04:01 UTC 2022
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 <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-16-test): Jule Anger <janger at samba.org>
Autobuild-Date(v4-16-test): Sun Feb 27 20:03:27 UTC 2022 on sn-devel-184
commit 76463193044cdbcf96a7199fa4bf4ef45a5b2513
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 e82833a107834cdfaef72e5a2c805a780ef2cba5
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 821e16c077c98ea4d792a4a788be68c2fbb21264
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 9016cb5c64351ff267d8deb43451370d6dcbba64
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 8eb4b0e04ca..412f315c662 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -485,11 +485,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. "
@@ -522,7 +522,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. "
@@ -1374,6 +1374,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