[SCM] Samba Shared Repository - branch v4-3-test updated
Karolin Seeger
kseeger at samba.org
Thu Apr 28 23:46:07 UTC 2016
The branch, v4-3-test has been updated
via 180cdd7 WHATSNEW: Start release notes for Samba 4.3.9.
via 6eef281 configure: Don't check for inotify on illumos
via 1050204 nwrap: Fix the build on Solaris
via d714633 smbd: Avoid large reads beyond EOF
via f8e6523 Fix the smb2_setinfo to handle FS info types and FSQUOTA infolevel
from 810dca6 libads: record session expiry for spnego sasl binds
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-3-test
- Log -----------------------------------------------------------------
commit 180cdd76ea722330591b74bc619c3e2e925af13b
Author: Karolin Seeger <kseeger at samba.org>
Date: Thu Apr 28 11:11:43 2016 +0200
WHATSNEW: Start release notes for Samba 4.3.9.
Signed-off-by: Karolin Seeger <kseeger at samba.org>
Autobuild-User(v4-3-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-3-test): Fri Apr 29 01:45:30 CEST 2016 on sn-devel-104
commit 6eef2811f52addddff012397d18dcdabbea71722
Author: Jorge Schrauwen <sjorge at blackdot.be>
Date: Sun Apr 3 11:43:50 2016 +0200
configure: Don't check for inotify on illumos
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11816
Reviewed-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 94f31295b12b20a68d596929ea428eb36f8c0d82)
commit 105020400d2e27f07a67e7643fa06d56a8a2eb2c
Author: Volker Lendecke <vl at samba.org>
Date: Mon Apr 4 13:43:02 2016 +0200
nwrap: Fix the build on Solaris
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11816
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Tue Apr 5 08:57:06 CEST 2016 on sn-devel-144
(cherry picked from commit ff6b49beeb5df30f4e243a97d2e6218ec497e9ad)
commit d714633634178b4c8ccf558a7019e17b5c9ee2ee
Author: Volker Lendecke <vl at samba.org>
Date: Wed Apr 27 12:15:37 2016 +0200
smbd: Avoid large reads beyond EOF
With unix extensions and oplocks=no mount.cifs from jessie reads beyond the
file end forever, and we are happy to return zeros....
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11878
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Wed Apr 27 23:57:56 CEST 2016 on sn-devel-144
(cherry picked from commit 10b0a8baa25fab70df8e6c5f0048ce0963211517)
commit f8e6523f58093039bc7499027a079f5be8fb05a8
Author: Partha Sarathi <partha at exablox.com>
Date: Thu Apr 14 12:39:05 2016 +0000
Fix the smb2_setinfo to handle FS info types and FSQUOTA infolevel
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11819
Signed-off-by: Partha Sarathi <partha at exablox.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Uri Simchoni <uri at samba.org>
Autobuild-User(master): Uri Simchoni <uri at samba.org>
Autobuild-Date(master): Wed Apr 27 05:39:01 CEST 2016 on sn-devel-144
(cherry picked from commit 07e2f4731e5819a893c4675d93fede5ea261bed7)
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 109 ++++++++++++++++++++++++-
lib/nss_wrapper/wscript | 2 +-
source3/smbd/globals.h | 7 ++
source3/smbd/reply.c | 10 +++
source3/smbd/smb2_setinfo.c | 18 +++++
source3/smbd/trans2.c | 143 +++++++++++++++++++++------------
source3/wscript | 11 ++-
source4/ntvfs/sysdep/wscript_configure | 13 ++-
8 files changed, 248 insertions(+), 65 deletions(-)
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 435ae45..d11756a 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,105 @@
=============================
+ Release Notes for Samba 4.3.9
+ April , 2016
+ =============================
+
+
+This is the latest stable release of Samba 4.3.
+
+
+Changes since 4.3.8:
+--------------------
+
+o Jeremy Allison <jra at samba.org>
+ * BUG 11742: lib: tevent: Fix memory leak when old signal action restored.
+ * BUG 11771: lib: tevent: Fix memory leak when old signal action restored.
+ * BUG 11822: s3: libsmb: Fix error where short name length was read as 2
+ bytes, should be 1.
+
+o Andrew Bartlett <abartlet at samba.org>
+ * BUG 11780: smbd: Only check dev/inode in open_directory, not the full
+ stat().
+ * BUG 11789: pydsdb: Fix returning of ldb.MessageElement.
+
+o Berend De Schouwer <berend.de.schouwer at gmail.com>
+ * BUG 11643: docs: Add example for domain logins to smbspool man page.
+
+o Günther Deschner <gd at samba.org>
+ * BUG 11789: libsmb/pysmb: Add pytalloc-util dependency to fix the build.
+
+o Alberto Maria Fiaschi <alberto.fiaschi at estar.toscana.it>
+ * BUG 8093: access based share enum: Handle permission set in configuration
+ files.
+
+o Volker Lendecke <vl at samba.org>
+ * BUG 11816: nwrap: Fix the build on Solaris.
+ * BUG 11827: vfs_catia: Fix memleak.
+ * BUG 11878: smbd: Avoid large reads beyond EOF.
+
+o Stefan Metzmacher <metze at samba.org>
+ * BUG 11622: libcli/smb: Make sure we have a body size of 0x31 before
+ dereferencing an ioctl response.
+ * BUG 11623: libcli/smb: Fix BUFFER_OVERFLOW handling in tstream_smbXcli_np.
+ * BUG 11755: s3:libads: Setup the msDS-SupportedEncryptionTypes attribute on
+ ldap_add.
+ * BUG 11771: tevent: Version 0.9.28. Fix memory leak when old signal action
+ restored.
+ * BUG 11782: s3:winbindd: Don't include two '\0' at the end of the domain
+ list.
+ * BUG 11789: s3:wscript: pylibsmb depends on pycredentials.
+
+o Noel Power <noel.power at suse.com>
+ * BUG 11738: libcli: Fix debug message, print sid string for new_ace trustee.
+
+o Garming Sam <garming at catalyst.net.nz>
+ * BUG 11789: build: Mark explicit dependencies on pytalloc-util.
+
+o Partha Sarathi <partha at exablox.com>
+ * BUG 11819: Fix the smb2_setinfo to handle FS info types and FSQUOTA
+ infolevel.
+
+o Jorge Schrauwen <sjorge at blackdot.be>
+ * BUG 11816: configure: Don't check for inotify on illumos.
+
+o Uri Simchoni <uri at samba.org>
+ * BUG 11691: winbindd: Return trust parameters when listing trusts.
+ * BUG 11753: smbd: Ignore SVHDX create context.
+ * BUG 11763: passdb: Add linefeed to debug message.
+ * BUG 11788: build: Fix disk-free quota support on Solaris 10.
+ * BUG 11798: build: Fix build when '--without-quota' specified.
+ * BUG 11806: vfs_acl_common: Avoid setting POSIX ACLs if "ignore system acls"
+ is set.
+ * BUG 11852: libads: Record session expiry for spnego sasl binds.
+
+o Hemanth Thummala <hemanth.thummala at nutanix.com>
+ * BUG 11740: Real memory leak(buildup) issue in loadparm.
+
+
+#######################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored. All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
+
+ =============================
Release Notes for Samba 4.3.8
April 12, 2016
=============================
@@ -16,8 +117,9 @@ o Stefan Metzmacher <metze at samba.org>
* Bug 11804 - prerequisite backports for the security release on
April 12th, 2016
-Release notes for the original 4.3.7 release follows:
------------------------------------------------------
+
+----------------------------------------------------------------------
+
=============================
Release Notes for Samba 4.3.7
@@ -555,8 +657,7 @@ database (https://bugzilla.samba.org/).
======================================================================
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
=============================
diff --git a/lib/nss_wrapper/wscript b/lib/nss_wrapper/wscript
index b25b83d..e12e1a7 100644
--- a/lib/nss_wrapper/wscript
+++ b/lib/nss_wrapper/wscript
@@ -62,7 +62,7 @@ def configure(conf):
define='HAVE_SOLARIS_GETPWUID_R', headers='unistd.h pwd.h')
conf.CHECK_C_PROTOTYPE('getgrent_r',
'struct group *getgrent_r(struct group *src, char *buf, int buflen)',
- define='SOLARIS_GETGRENT_R', headers='unistd.h grp.h')
+ define='HAVE_SOLARIS_GETGRENT_R', headers='unistd.h grp.h')
conf.CHECK_C_PROTOTYPE('getgrnam_r',
'int getgrnam_r(const char *name, struct group *grp, char *buf, int buflen, struct group **pgrp)',
define='HAVE_SOLARIS_GETGRNAM_R', headers='unistd.h grp.h')
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 35a3ee9..3a2b016 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -143,6 +143,13 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
char **ppdata,
unsigned int *pdata_size);
+NTSTATUS smbd_do_setfsinfo(connection_struct *conn,
+ struct smb_request *req,
+ TALLOC_CTX *mem_ctx,
+ uint16_t info_level,
+ files_struct *fsp,
+ const DATA_BLOB *pdata);
+
NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn,
struct smb_request *req,
TALLOC_CTX *mem_ctx,
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index c9d0d81..476ac7e 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3935,6 +3935,16 @@ normal_read:
uint8_t headerbuf[smb_size + 2*12 + 1 /* padding byte */];
ssize_t ret;
+ if (!S_ISREG(fsp->fsp_name->st.st_ex_mode) ||
+ (startpos > fsp->fsp_name->st.st_ex_size) ||
+ (smb_maxcnt > (fsp->fsp_name->st.st_ex_size - startpos))) {
+ /*
+ * We already know that we would do a short
+ * read, so don't try the sendfile() path.
+ */
+ goto nosendfile_read;
+ }
+
construct_reply_common_req(req, (char *)headerbuf);
setup_readX_header(req, (char *)headerbuf, smb_maxcnt);
diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c
index 9361aea..a9196fe 100644
--- a/source3/smbd/smb2_setinfo.c
+++ b/source3/smbd/smb2_setinfo.c
@@ -530,6 +530,24 @@ static struct tevent_req *smbd_smb2_setinfo_send(TALLOC_CTX *mem_ctx,
break;
}
+ case 0x02:/* SMB2_SETINFO_FS */
+ {
+ uint16_t file_info_level = in_file_info_class + 1000;
+
+ status = smbd_do_setfsinfo(conn, smbreq, state,
+ file_info_level,
+ fsp,
+ &in_input_buffer);
+ if (!NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_LEVEL)) {
+ status = NT_STATUS_INVALID_INFO_CLASS;
+ }
+ tevent_req_nterror(req, status);
+ return tevent_req_post(req, ev);
+ }
+ break;
+ }
+
case 0x03:/* SMB2_SETINFO_SECURITY */
{
if (!CAN_WRITE(conn)) {
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index ff1ef15..6d50dd3 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -3871,6 +3871,86 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
return status;
}
+static NTSTATUS smb_set_fsquota(connection_struct *conn,
+ struct smb_request *req,
+ files_struct *fsp,
+ const DATA_BLOB *qdata)
+{
+ NTSTATUS status;
+ SMB_NTQUOTA_STRUCT quotas;
+
+ ZERO_STRUCT(quotas);
+
+ /* access check */
+ if ((get_current_uid(conn) != 0) || !CAN_WRITE(conn)) {
+ DEBUG(3, ("set_fsquota: access_denied service [%s] user [%s]\n",
+ lp_servicename(talloc_tos(), SNUM(conn)),
+ conn->session_info->unix_info->unix_name));
+ return NT_STATUS_ACCESS_DENIED;
+ }
+
+ if (!check_fsp_ntquota_handle(conn, req,
+ fsp)) {
+ DEBUG(1, ("set_fsquota: no valid QUOTA HANDLE\n"));
+ return NT_STATUS_INVALID_HANDLE;
+ }
+
+ /* note: normally there're 48 bytes,
+ * but we didn't use the last 6 bytes for now
+ * --metze
+ */
+ if (qdata->length < 42) {
+ DEBUG(0,("set_fsquota: requires total_data(%u) >= 42 bytes!\n",
+ (unsigned int)qdata->length));
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
+ /* unknown_1 24 NULL bytes in pdata*/
+
+ /* the soft quotas 8 bytes (uint64_t)*/
+ quotas.softlim = BVAL(qdata->data,24);
+
+ /* the hard quotas 8 bytes (uint64_t)*/
+ quotas.hardlim = BVAL(qdata->data,32);
+
+ /* quota_flags 2 bytes **/
+ quotas.qflags = SVAL(qdata->data,40);
+
+ /* unknown_2 6 NULL bytes follow*/
+
+ /* now set the quotas */
+ if (vfs_set_ntquota(fsp, SMB_USER_FS_QUOTA_TYPE, NULL, "as)!=0) {
+ DEBUG(1, ("vfs_set_ntquota() failed for service [%s]\n",
+ lp_servicename(talloc_tos(), SNUM(conn))));
+ status = map_nt_error_from_unix(errno);
+ } else {
+ status = NT_STATUS_OK;
+ }
+ return status;
+}
+
+NTSTATUS smbd_do_setfsinfo(connection_struct *conn,
+ struct smb_request *req,
+ TALLOC_CTX *mem_ctx,
+ uint16_t info_level,
+ files_struct *fsp,
+ const DATA_BLOB *pdata)
+{
+ switch (info_level) {
+ case SMB_FS_QUOTA_INFORMATION:
+ {
+ return smb_set_fsquota(conn,
+ req,
+ fsp,
+ pdata);
+ }
+
+ default:
+ break;
+ }
+ return NT_STATUS_INVALID_LEVEL;
+}
+
/****************************************************************************
Reply to a TRANS2_QFSINFO (query filesystem info).
****************************************************************************/
@@ -4098,63 +4178,22 @@ static void call_trans2setfsinfo(connection_struct *conn,
case SMB_FS_QUOTA_INFORMATION:
{
+ NTSTATUS status;
+ DATA_BLOB qdata = {
+ .data = (uint8_t *)pdata,
+ .length = total_data
+ };
files_struct *fsp = NULL;
- SMB_NTQUOTA_STRUCT quotas;
-
- ZERO_STRUCT(quotas);
-
- /* access check */
- if ((get_current_uid(conn) != 0) || !CAN_WRITE(conn)) {
- DEBUG(0,("set_user_quota: access_denied service [%s] user [%s]\n",
- lp_servicename(talloc_tos(), SNUM(conn)),
- conn->session_info->unix_info->unix_name));
- reply_nterror(req, NT_STATUS_ACCESS_DENIED);
- return;
- }
-
- /* note: normally there're 48 bytes,
- * but we didn't use the last 6 bytes for now
- * --metze
- */
fsp = file_fsp(req, SVAL(params,0));
- if (!check_fsp_ntquota_handle(conn, req,
- fsp)) {
- DEBUG(3,("TRANSACT_GET_USER_QUOTA: no valid QUOTA HANDLE\n"));
- reply_nterror(
- req, NT_STATUS_INVALID_HANDLE);
- return;
- }
-
- if (total_data < 42) {
- DEBUG(0,("call_trans2setfsinfo: SET_FS_QUOTA: requires total_data(%d) >= 42 bytes!\n",
- total_data));
- reply_nterror(
- req,
- NT_STATUS_INVALID_PARAMETER);
- return;
- }
-
- /* unknown_1 24 NULL bytes in pdata*/
-
- /* the soft quotas 8 bytes (uint64_t)*/
- quotas.softlim = BVAL(pdata,24);
-
- /* the hard quotas 8 bytes (uint64_t)*/
- quotas.hardlim = BVAL(pdata,32);
-
- /* quota_flags 2 bytes **/
- quotas.qflags = SVAL(pdata,40);
-
- /* unknown_2 6 NULL bytes follow*/
-
- /* now set the quotas */
- if (vfs_set_ntquota(fsp, SMB_USER_FS_QUOTA_TYPE, NULL, "as)!=0) {
- DEBUG(0,("vfs_set_ntquota() failed for service [%s]\n",lp_servicename(talloc_tos(), SNUM(conn))));
- reply_nterror(req, map_nt_error_from_unix(errno));
+ status = smb_set_fsquota(conn,
+ req,
+ fsp,
+ &qdata);
+ if (!NT_STATUS_IS_OK(status)) {
+ reply_nterror(req, status);
return;
}
-
break;
}
default:
diff --git a/source3/wscript b/source3/wscript
index 1a31fb2..e201710 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -117,10 +117,13 @@ long ret = splice(0,0,1,0,400,SPLICE_F_MOVE);
headers='fcntl.h'):
conf.CHECK_DECLS('splice', reverse=True, headers='fcntl.h')
- # Check for inotify support
- conf.CHECK_HEADERS('sys/inotify.h')
- if "HAVE_SYS_INOTIFY_H" in conf.env:
- conf.DEFINE('HAVE_INOTIFY', 1)
+ # Check for inotify support (Skip if we are SunOS)
+ #NOTE: illumos provides sys/inotify.h but is not an exact match for linux
+ host_os = sys.platform
+ if host_os.rfind('sunos') == -1:
+ conf.CHECK_HEADERS('sys/inotify.h')
+ if "HAVE_SYS_INOTIFY_H" in conf.env:
+ conf.DEFINE('HAVE_INOTIFY', 1)
# Check for kernel change notify support
conf.CHECK_CODE('''
diff --git a/source4/ntvfs/sysdep/wscript_configure b/source4/ntvfs/sysdep/wscript_configure
index aa63000..274fc08 100644
--- a/source4/ntvfs/sysdep/wscript_configure
+++ b/source4/ntvfs/sysdep/wscript_configure
@@ -1,9 +1,14 @@
#!/usr/bin/env python
-conf.CHECK_HEADERS('sys/inotify.h', add_headers=False)
+import sys
+
+# Check for inotify support (Skip if we are SunOS)
+#NOTE: illumos provides sys/inotify.h but is not an exact match for linux
+host_os = sys.platform
+if host_os.rfind('sunos') == -1:
+ conf.CHECK_HEADERS('sys/inotify.h', add_headers=False)
+ if (conf.CONFIG_SET('HAVE_SYS_INOTIFY_H')):
+ conf.DEFINE('HAVE_LINUX_INOTIFY', 1)
conf.CHECK_DECLS('F_SETLEASE', headers='linux/fcntl.h', reverse=True)
conf.CHECK_DECLS('SA_SIGINFO', headers='signal.h', reverse=True)
-
-if (conf.CONFIG_SET('HAVE_SYS_INOTIFY_H')):
- conf.DEFINE('HAVE_LINUX_INOTIFY', 1)
--
Samba Shared Repository
More information about the samba-cvs
mailing list