[SCM] Samba Shared Repository - branch master updated
David Disseldorp
ddiss at samba.org
Thu Jul 20 21:03:02 UTC 2017
The branch, master has been updated
via ff7df3d build: fix ceph_statx check when configured with libcephfs_dir
via c57dcaf s3/utils: smbcacls failed to detect DIRECTORIES using SMB2 (windows only)
from 7313e7c s4-torture: point out why we cannot validate MSZIP compressed files
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ff7df3d3f5259362a6bb6780d6b532e57e89681d
Author: David Disseldorp <ddiss at suse.de>
Date: Thu Jul 20 11:10:57 2017 +0200
build: fix ceph_statx check when configured with libcephfs_dir
When configured with a custom libcephfs_dir, the ceph_statx check fails
to link. This is due to the location of the ceph-common dependency,
which is installed under a ceph subdirectory.
ceph/build > make DESTDIR=./inst install
...
ceph/build > find inst/|grep -e /libcephfs -e /libceph-common
inst/usr/local/lib64/ceph/libceph-common.so.0
inst/usr/local/lib64/ceph/libceph-common.so
inst/usr/local/lib64/libcephfs.so.2.0.0
inst/usr/local/lib64/libcephfs.so.2
inst/usr/local/lib64/libcephfs.so
inst/usr/local/include/cephfs/libcephfs.h
Signed-off-by: David Disseldorp <ddiss at suse.de>
Reviewed-by: Jeff Layton <jlayton at samba.org>
Autobuild-User(master): David Disseldorp <ddiss at samba.org>
Autobuild-Date(master): Thu Jul 20 23:02:27 CEST 2017 on sn-devel-144
commit c57dcafb150823b00fd873046e65a966a8488fa8
Author: Noel Power <noel.power at suse.com>
Date: Thu Jul 20 13:01:50 2017 +0100
s3/utils: smbcacls failed to detect DIRECTORIES using SMB2 (windows only)
uint16_t get_fileinfo(...) returns file attributes, this function
called
cli_qfileinfo_basic(cli, fnum, &mode, NULL, NULL, NULL,
NULL, NULL, NULL);
which was failing with NT_STATUS_ACCESS_DENIED errors when fnum above
was obtained via (when using protocol > SMB). Note: This only seems to be
an issue when run against a windows server, with smbd SMB1 & SMB2 work fine.
status = cli_ntcreate(cli, filename, 0, CREATE_ACCESS_READ,
0, FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_OPEN, 0x0, 0x0, &fnum, NULL);
The failing cli_qfileinfo_basic call above is unnecessary as we can already
obtain the required information from the cli_ntcreate call
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/utils/smbcacls.c | 14 +++-----------
source3/wscript | 9 +++++++--
2 files changed, 10 insertions(+), 13 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 86b4591..6bf32e5 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -229,30 +229,22 @@ get fileinfo for filename
static uint16_t get_fileinfo(struct cli_state *cli, const char *filename)
{
uint16_t fnum = (uint16_t)-1;
- uint16_t mode = 0;
NTSTATUS status;
+ struct smb_create_returns cr = {0};
/* The desired access below is the only one I could find that works
with NT4, W2KP and Samba */
status = cli_ntcreate(cli, filename, 0, CREATE_ACCESS_READ,
0, FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN, 0x0, 0x0, &fnum, NULL);
+ FILE_OPEN, 0x0, 0x0, &fnum, &cr);
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to open %s: %s\n", filename, nt_errstr(status));
return 0;
}
- status = cli_qfileinfo_basic(cli, fnum, &mode, NULL, NULL, NULL,
- NULL, NULL, NULL);
- if (!NT_STATUS_IS_OK(status)) {
- printf("Failed to file info %s: %s\n", filename,
- nt_errstr(status));
- }
-
cli_close(cli, fnum);
-
- return mode;
+ return cr.file_attributes;
}
/*****************************************************
diff --git a/source3/wscript b/source3/wscript
index 8fa51fb..534ff44 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1575,11 +1575,16 @@ main() {
if Options.options.libcephfs_dir:
conf.env['CPPPATH_CEPHFS'] = Options.options.libcephfs_dir + '/include'
conf.env['LIBPATH_CEPHFS'] = Options.options.libcephfs_dir + '/lib'
+ conf.env['LIBPATH_CEPH-COMMON'] = Options.options.libcephfs_dir + '/lib/ceph'
- if conf.CHECK_HEADERS('cephfs/libcephfs.h', False, False, 'cephfs') and conf.CHECK_LIB('cephfs', shlib=True) and Options.options.with_cephfs:
+ if (Options.options.with_cephfs and
+ conf.CHECK_HEADERS('cephfs/libcephfs.h', False, False, 'cephfs') and
+ conf.CHECK_LIB('cephfs', shlib=True) and
+ conf.CHECK_LIB('ceph-common', shlib=True)):
if Options.options.with_acl_support:
conf.DEFINE('HAVE_CEPH', '1')
- if conf.CHECK_FUNCS_IN('ceph_statx', 'cephfs', headers='cephfs/libcephfs.h'):
+ if conf.CHECK_FUNCS_IN('ceph_statx', 'cephfs ceph-common',
+ headers='cephfs/libcephfs.h'):
conf.DEFINE('HAVE_CEPH_STATX', '1')
else:
Logs.warn("ceph support disabled due to --without-acl-support")
--
Samba Shared Repository
More information about the samba-cvs
mailing list