[SCM] Samba Shared Repository - branch v4-10-test updated
Karolin Seeger
kseeger at samba.org
Mon Nov 4 11:36:02 UTC 2019
The branch, v4-10-test has been updated
via bb4dd482917 replace: Only link libnsl and libsocket if requrired
via d92fa942a25 s3: torture: Ensure SMB1 cli_qpathinfo2() doesn't return an inode number.
via f48393e1bd9 s3: libsmb: Ensure SMB1 cli_qpathinfo2() doesn't return an inode number.
via 9dabad3ccb7 wscript: Remove checks for shm_open and shmget
via 5c49caea0e2 waf: print the library name in which we search for a function
from f86e09dcd48 VERSION: Bump version up to 4.10.11.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-10-test
- Log -----------------------------------------------------------------
commit bb4dd482917893054eb4f01d9a6941fef182c292
Author: Andreas Schneider <asn at samba.org>
Date: Mon Oct 21 17:08:08 2019 +0200
replace: Only link libnsl and libsocket if requrired
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14168
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Alexander Bokovoy <ab at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Wed Oct 23 08:23:13 UTC 2019 on sn-devel-184
(cherry picked from commit 263bec1b8d0744da73dd92e4a361fb7430289ab3)
Autobuild-User(v4-10-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-10-test): Mon Nov 4 11:35:33 UTC 2019 on sn-devel-144
commit d92fa942a2503dea191fc1822ad2294f38efc838
Author: Jeremy Allison <jra at samba.org>
Date: Thu Oct 17 12:41:08 2019 -0700
s3: torture: Ensure SMB1 cli_qpathinfo2() doesn't return an inode number.
Piggyback on existing tests, ensure we don't regress on:
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14161
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 8e55a8562951924e4b1aad5a6d67fc8b309590c1)
commit f48393e1bd922c70f44264e6848c7fbf488f700a
Author: Jeremy Allison <jra at samba.org>
Date: Thu Oct 17 11:39:02 2019 -0700
s3: libsmb: Ensure SMB1 cli_qpathinfo2() doesn't return an inode number.
The info level it uses doesn't return that, previously we
were using the field that is returned as the EA size as
the inode number (which is usually zero, so the code in
libsmbclient would then synthesize an inode number from
a hash of the pathname, which is all it can do for SMB1).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14161
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit d495074ee27a5f528d5156a69800ee58d799b1eb)
commit 9dabad3ccb7bb8234d854439bdae40353496897d
Author: Christof Schmitt <cs at samba.org>
Date: Wed Apr 24 10:16:30 2019 -0700
wscript: Remove checks for shm_open and shmget
Commit 74a16a1094278 "s3:smbprofile: Replace sysv shmem with tdb"
removed the usage of the shared memory segment for profiling data. As
there are no other users of shared memory segments, remove the configure
check for these functions.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14140
Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 94f2ed3eb35b94d5152578dbb6d5ee8f2fa2da69)
commit 5c49caea0e2798d41ced01b65f54fa354f58a637
Author: Björn Jacke <bj at sernet.de>
Date: Mon Feb 11 10:03:00 2019 +0100
waf: print the library name in which we search for a function
Signed-off-by: Bjoern Jacke <bjacke at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 7058a88cbe3c1a2ad272b6debc1c9d09a259d116)
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_autoconf.py | 5 +++-
lib/replace/wscript | 36 +++++++++++++++++++++----
source3/libsmb/clirap.c | 10 ++++++-
source3/torture/torture.c | 49 +++++++++++++++++++++++++++++++++--
source3/wscript | 3 ---
5 files changed, 91 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 6208e3b0439..a39d6ef06d1 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -251,7 +251,10 @@ def CHECK_FUNC(conf, f, link=True, lib=None, headers=None):
ret = False
- conf.COMPOUND_START('Checking for %s' % f)
+ in_lib_str = ""
+ if lib:
+ in_lib_str = " in %s" % lib
+ conf.COMPOUND_START('Checking for %s%s' % (f, in_lib_str))
if link is None or link:
ret = CHECK_CODE(conf,
diff --git a/lib/replace/wscript b/lib/replace/wscript
index b5919835c0b..0ebeb36944f 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -190,10 +190,35 @@ def configure(conf):
conf.CHECK_TYPE_IN('sig_atomic_t', 'signal.h', define='HAVE_SIG_ATOMIC_T_TYPE')
conf.CHECK_FUNCS('sigsetmask siggetmask sigprocmask sigblock sigaction sigset')
- conf.CHECK_FUNCS_IN('''inet_ntoa inet_aton inet_ntop inet_pton connect gethostbyname
- getaddrinfo getnameinfo freeaddrinfo gai_strerror socketpair''',
- 'socket nsl', checklibc=True,
- headers='sys/socket.h netinet/in.h arpa/inet.h netdb.h')
+ # Those functions are normally available in libc
+ if not conf.CHECK_FUNCS('''
+ inet_ntoa
+ inet_aton
+ inet_ntop
+ inet_pton
+ connect
+ gethostbyname
+ getaddrinfo
+ getnameinfo
+ freeaddrinfo
+ gai_strerror
+ socketpair''',
+ headers='sys/socket.h netinet/in.h arpa/inet.h netdb.h'):
+ conf.CHECK_FUNCS_IN('''
+ inet_ntoa
+ inet_aton
+ inet_ntop
+ inet_pton
+ connect
+ gethostbyname
+ getaddrinfo
+ getnameinfo
+ freeaddrinfo
+ gai_strerror
+ socketpair''',
+ 'socket nsl',
+ headers='sys/socket.h netinet/in.h arpa/inet.h netdb.h')
+ conf.DEFINE('REPLACE_REQUIRES_LIBSOCKET_LIBNSL', 1)
conf.CHECK_FUNCS('memset_s memset_explicit')
@@ -835,6 +860,7 @@ def build(bld):
extra_libs = ''
if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd'
if bld.CONFIG_SET('HAVE_LIBRT'): extra_libs += ' rt'
+ if bld.CONFIG_SET('REPLACE_REQUIRES_LIBSOCKET_LIBNSL'): extra_libs += ' socket nsl'
bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
REPLACE_HOSTCC_SOURCE,
@@ -875,7 +901,7 @@ def build(bld):
# at the moment:
# hide_symbols=bld.BUILTIN_LIBRARY('replace'),
private_library=True,
- deps='crypt dl nsl socket attr' + extra_libs)
+ deps='crypt dl attr' + extra_libs)
replace_test_cflags = ''
if bld.CONFIG_SET('HAVE_WNO_FORMAT_TRUNCATION'):
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index e80dfc92a77..b4b40ebdab4 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -855,7 +855,15 @@ NTSTATUS cli_qpathinfo2_recv(struct tevent_req *req,
*size = IVAL2_TO_SMB_BIG_UINT(state->data,48);
}
if (ino) {
- *ino = IVAL(state->data, 64);
+ /*
+ * SMB1 qpathinfo2 uses SMB_QUERY_FILE_ALL_INFO
+ * which doesn't return an inode number (fileid).
+ * We can't change this to one of the FILE_ID
+ * info levels as only Win2003 and above support
+ * these [MS-SMB: 2.2.2.3.1] and the SMB1 code
+ * needs to support older servers.
+ */
+ *ino = 0;
}
return NT_STATUS_OK;
}
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 3507e4f198b..74c981a7f8e 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -3390,6 +3390,7 @@ static bool run_trans2test(int dummy)
bool correct = True;
NTSTATUS status;
uint32_t fs_attr;
+ uint64_t ino;
printf("starting trans2 test\n");
@@ -3397,6 +3398,14 @@ static bool run_trans2test(int dummy)
return False;
}
+ if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
+ /* Ensure ino is zero, SMB2 gets a real one. */
+ ino = 0;
+ } else {
+ /* Ensure ino is -1, SMB1 never gets a real one. */
+ ino = (uint64_t)-1;
+ }
+
status = cli_get_fs_attr_info(cli, &fs_attr);
if (!NT_STATUS_IS_OK(status)) {
printf("ERROR: cli_get_fs_attr_info returned %s\n",
@@ -3468,7 +3477,7 @@ static bool run_trans2test(int dummy)
O_RDWR | O_CREAT | O_TRUNC, DENY_NONE, &fnum);
cli_close(cli, fnum);
status = cli_qpathinfo2(cli, fname, &c_time_ts, &a_time_ts, &w_time_ts,
- &m_time_ts, &size, NULL, NULL);
+ &m_time_ts, &size, NULL, &ino);
if (!NT_STATUS_IS_OK(status)) {
printf("ERROR: qpathinfo2 failed (%s)\n", nt_errstr(status));
correct = False;
@@ -3478,6 +3487,19 @@ static bool run_trans2test(int dummy)
printf("This system appears to set a initial 0 write time\n");
correct = False;
}
+ if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
+ /* SMB2 should always return an inode. */
+ if (ino == 0) {
+ printf("SMB2 bad inode (0)\n");
+ correct = false;
+ }
+ } else {
+ /* SMB1 must always return zero here. */
+ if (ino != 0) {
+ printf("SMB1 bad inode (!0)\n");
+ correct = false;
+ }
+ }
}
cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
@@ -9970,11 +9992,20 @@ static bool run_dir_createtime(int dummy)
struct timespec create_time1;
uint16_t fnum;
bool ret = false;
+ uint64_t ino;
if (!torture_open_connection(&cli, 0)) {
return false;
}
+ if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
+ /* Ensure ino is zero, SMB2 gets a real one. */
+ ino = 0;
+ } else {
+ /* Ensure ino is -1, SMB1 never gets a real one. */
+ ino = (uint64_t)-1;
+ }
+
cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
cli_rmdir(cli, dname);
@@ -9985,13 +10016,27 @@ static bool run_dir_createtime(int dummy)
}
status = cli_qpathinfo2(cli, dname, &create_time, NULL, NULL, NULL,
- NULL, NULL, NULL);
+ NULL, NULL, &ino);
if (!NT_STATUS_IS_OK(status)) {
printf("cli_qpathinfo2 returned %s\n",
nt_errstr(status));
goto out;
}
+ if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
+ /* SMB2 should always return an inode. */
+ if (ino == 0) {
+ printf("SMB2 bad inode (0)\n");
+ goto out;
+ }
+ } else {
+ /* SMB1 must always return zero here. */
+ if (ino != 0) {
+ printf("SMB1 bad inode (!0)\n");
+ goto out;
+ }
+ }
+
/* Sleep 3 seconds, then create a file. */
sleep(3);
diff --git a/source3/wscript b/source3/wscript
index 5c2ba18f872..9d283e40a40 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -119,8 +119,6 @@ def configure(conf):
conf.CHECK_FUNCS('lutimes futimes utimensat futimens')
conf.CHECK_FUNCS('mlock munlock mlockall munlockall')
conf.CHECK_FUNCS('memalign posix_memalign hstrerror')
- conf.CHECK_FUNCS('shmget')
- conf.CHECK_FUNCS_IN('shm_open', 'rt', checklibc=True)
conf.CHECK_FUNCS_IN('yp_get_default_domain', 'nsl')
conf.CHECK_FUNCS_IN('dn_expand _dn_expand __dn_expand', 'resolv')
conf.CHECK_FUNCS_IN('dn_expand', 'inet')
@@ -408,7 +406,6 @@ rdchk _read __read _readdir __readdir
_seekdir __seekdir
select setenv setgidx setgroups setlocale setluid
setmntent setpgid setpriv setsid setuidx
-shmget shm_open
_stat __stat statvfs
strcasecmp strchr strpbrk strsignal strtol strupr sysconf sysctl sysctlbyname
__sys_llseek syslog _telldir __telldir timegm
--
Samba Shared Repository
More information about the samba-cvs
mailing list