[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri Feb 18 23:13:01 UTC 2022
The branch, master has been updated
via 45cb14ac808 waf: re-add missing readlink test
via e225ab70db0 readlink test: inverse return code
via 89e903985b6 wscript: s/default/required/ _static_modules for the acl modules
via 396c17160c1 vfs_aixacl: add proper header file
via 183ab5ced83 acl: fix function arguments for AIX' and Solaris' sys_acl_get_fd()
from 408be543238 s3: smbd: Fix our leases code to return the correct error in the non-dynamic share case.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 45cb14ac80889ac913f7f76dbfaebcb4d5ee14fd
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
commit e225ab70db0cc01454d319eaca5265d7e33f396c
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>
commit 89e903985b6968c5becc69b757b23144b1aba66e
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>
commit 396c17160c19c6df43123074bf62268c6ed0f9e4
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>
commit 183ab5ced8377b63ad07d2e810396d3b414f4a7d
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>
-----------------------------------------------------------------------
Summary of changes:
source3/lib/sysacls.c | 8 ++++++--
lib/util/select.h => source3/modules/vfs_aixacl.h | 21 +++++++++++++--------
source3/modules/vfs_solarisacl.h | 1 +
source3/wscript | 12 +++++++++---
tests/readlink.c | 11 +++++++----
5 files changed, 36 insertions(+), 17 deletions(-)
copy lib/util/select.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..a7ab5836536 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
@@ -387,7 +391,7 @@ SMB_ACL_T sys_acl_get_fd(vfs_handle_struct *handle,
SMB_ACL_TYPE_T type,
TALLOC_CTX *mem_ctx)
{
- return aixacl_sys_acl_get_fd(handle, fsp, mem_ctx);
+ return aixacl_sys_acl_get_fd(handle, fsp, type, mem_ctx);
}
int sys_acl_set_fd(vfs_handle_struct *handle,
@@ -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/lib/util/select.h b/source3/modules/vfs_aixacl.h
similarity index 54%
copy from lib/util/select.h
copy to source3/modules/vfs_aixacl.h
index fa1970ec016..f9fe3f85dc6 100644
--- a/lib/util/select.h
+++ b/source3/modules/vfs_aixacl.h
@@ -1,7 +1,5 @@
/*
- Unix SMB/Netbios implementation.
- Samba select/poll implementation
- Copyright (C) Andrew Tridgell 1992-1998
+ 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
@@ -17,13 +15,20 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _select_h_
-#define _select_h_
+#ifndef __VFS_AIXACL_H__
+#define __VFS_AIXACL_H__
-#include "system/select.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);
-/* The following definitions come from lib/util/select.c */
+int aixacl_sys_acl_set_fd(vfs_handle_struct *handle,
+ files_struct *fsp,
+ SMB_ACL_TYPE_T type,
+ SMB_ACL_T acl_d);
-int sys_poll_intr(struct pollfd *fds, int num_fds, int timeout);
+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