[SCM] Samba Shared Repository - branch v4-0-stable updated
Karolin Seeger
kseeger at samba.org
Tue Apr 15 01:07:03 MDT 2014
The branch, v4-0-stable has been updated
via 52eee62 WHATSNEW: Add release notes for Samba 4.0.17.
via e6ff129 s3: messages: Implement cleanup of dead records.
via b649fdb s3: smbd: Ensure we always go via getgroups_unix_user() when creating an NT token.
via fc185a5 tevent: fix crash bug in tevent_queue_immediate_trigger()
via f9e8a9e lsa.idl: define lsa.ForestTrustCollisionInfo and ForestTrustCollisionRecord as public structs
via ecfe72f s3-rpc_server: Fix handling of fragmented rpc requests.
via 2170b8c s3:rpc_server: minor refactoring of process_request_pdu()
via eec2818 pidl-waf: Only install Yapp::Driver if it is not available.
via f21b897 pidl-waf: Check for system perl(Parse::Yapp::Driver).
via fb992a8 pidl-waf: Add a function to check for a system perl module.
via 50567ff pidl-waf: Do not glob to install pidl modules.
via 667a59c pidl-waf: Install pidl modules to the perl vendorlib directory.
via 10573dd pidl-waf: Remove unused variable pidl_src.
via 60b8f8f autobuild: Set perl vendorlib direcotry.
via f46447a buildtools: Add perl vendorlib configure option.
via 503d0ff buildtools: Rename perl vendorarch configure option.
via cd208b2 dns: Extend tests for records with another type
via 7bac6e0 bug #10471: Don't respond with NXDOMAIN to records that exist with another type
via 67fc5bf s3: smbd: Fileserving share access checks.
via c96bac8 smbreadline: switch to new-style readline typedef
via e53c10d s4:lib/socket: simplify iface_list_wildcard() and its callers
via 74aa879 s4:lib/socket: use the same logic in iface_list_wildcard() as in smbd
via 5f4c1bb s3:smbd: s/BUFFER_SIZE/LARGE_WRITEX_BUFFER_SIZE
via a42b892 s3:smbd: fix the maxentries calculation depending on the max_send.
via 03f9c61 s3:smbd: simplify maxentries calculation in reply_search()
via 00a60ed s3:smbd: fix the read numtoread calculation depending on the max_send.
via e915655 s3:smbd: fix the lockread numtoread calculation depending on the max_send.
via 93e5454 s3:smbd: pass the final numtoread reply_outbuf() for the lockread reply.
via e6b365a s3:smbd: fix lockread numtoread calculation to match reply_outbuf() arguments.
via 9da034e s3:smbd: take less than SMB_BUFFER_SIZE_MIN ('500') as header overhead in ipc.c
via 1039e5f s3:smbd: reject a MaxBufferSize < SMB_BUFFER_SIZE_MIN (500) in a session setup request
via a5ce91c s3:smbd: use sconn->smb1.sessions.max_send = SMB_BUFFER_SIZE_MAX
via 1c13590 s3:smbd: use SMB_BUFFER_SIZE_MIN/MAX to limit lp_max_xmit()
via e06ff86 s3:include: let CLI_BUFFER_SIZE be an alias of SMB_BUFFER_SIZE_MAX
via b6ee584 libcli/smb: add SMB_BUFFER_SIZE_MIN/MAX defines
via 1fac62c s3:param: avoid using BUFFER_SIZE to limit the lp_min_receive_file_size()
via ab7c46c s3:client: only limit the buffer by the given length 'n'
via eeb901b s3:torture: use CLI_BUFFER_SIZE instead of BUFFER_SIZE
via e98e7b0 s3:utils/smbfilter: use a local variable for the packet buffer
via 57cd00c s3:smbd: avoid invalid lock_order panic triggered by "CTDB_SRVID_RELEASE_IP"
via f850683 s3:lib/ctdbd_conn: let release_ip_handler return bool
via 95b04d7 s3:smbd: maintain smbd_server_connection->status
via c759f09 s3:smbd: simplify exit_server_common()
via 1560850 s3:smbd: s/EVENT_FD/TEVENT_FD
via 626fc22 doc: add "spoolss: architecture" parameter usage
via 33419d8 s4: smbtorture: Add a proper change_notify going async followed by tdis test.
via 25464e3 s4: smbtorture: Update the torture_smb2_notify_ulogoff test to demonstrate the problem.
via 77d1158 s3:smb2_tcon: cancel and wait for pending requests on tdis
via e736677 s3:smb2_sesssetup: cancel and wait for pending requests on logoff
via 37b51d7 s3:smb2_tcon: split smbd_smb2_tdis into an async *_send/recv pair.
via 5f8bc31 s3:smb2_sesssetup: split smbd_smb2_logoff into an async *_send/recv pair.
via f7cc9d0 s3:smb2_lock: return RANGE_NOT_LOCKED instead of CANCELLED for logoff and tdis
via 53ae5fb s3:smb2_lock: fix whitespaces/tabs in smbd_smb2_lock_cancel()
via 6896d0c s4:torture/smb2: accept NT_STATUS_RANGE_NOT_LOCKED after smb2_logoff/tdis
via b86c4fa s3: lib: Back-port tevent_queue_wait_send/recv -> smbd_tevent_queue_wait_send/recv
via 87a0240 tevent: fix crash bug in tevent_queue_immediate_trigger()
via e42fd53 Merge tag 'samba-4.0.16' into v4-0-test
via 58cb450 VERSION: Bump version number up to 4.0.17.
via 887e04b VERSION: Disable git snapshots for the 4.0.16 release.
via a656392 WHATSNEW: Add release notes for Samba 4.0.16.
via caad2f0 CVE-2013-6442: s3:smbcacls - ensure we don't lose an existing ACL when setting owner or group owner.
via e999b98 CVE-2013-4496:Revert remainder of ce895609b04380bfc41e4f8fddc84bd2f9324340
via 6b8bca5 CVE-2013-4496:samr: Remove ChangePasswordUser
via d8b5c1b CVE-2013-4496:s3:auth: fix memory leak in the ACCOUNT_LOCKED_OUT case.
via ac0ef44 CVE-2013-4496:s3-samr: Block attempts to crack passwords via repeated password changes
via 24fec62 s3-spoolssd: Don't register spoolssd if epmd is not running.
via 9537207 s3:winbindd: avoid directly asking a trusted domain in wb_lookupsids*()
via 099a02a s3:winbindd: fix _wbint_LookupSids() on error
via cc754e6 pidl:NDR/Client: fix dcerpc_function() with [out,ref] pointers
via 52990c9 s3: smbd: Ensure brl_get_locks_internal() always returns a valid struct byte_range_lock even if there are no locks.
via f4b8045 s3-printing: Fix obvious memory leak in printer_list_get_printer().
via a8fb002 rpc_client: retry open on STATUS_PIPE_NOT_AVAILABLE
via fd8d469 s3: ldap client can return NT_STATUS_OK when an error occurs in a paged search.
via e1f7cbc waf: improve iconv checks
via f33c3ad heimdal_build: only enable libintl functions if everything was found
via 8b062f1 waf:lib/replace fix iconv checks on HP/UX
via 4aafa69 waf:lib/replace gettext configure checks
via e8ab980 waf:lib/replace fix gettext detection
via 7346b57 waf:lib/replace change detection of gettext
via f4e1771 waf:lib/replace fix up libintl related checks
via 0d2e0d4 waf:lib/replace correct detection of libiconv
via 68c6cb5 s3: printing: Fix problem with server taking too long to respond to a MSG_PRINTER_DRVUPGRADE message.
via 23bec26 librpc/nbt: increase MAX_COMPONENTS limit for nbt_names.
via 4d857a9 dfs: always call create_conn_struct with root privileges
via 4bc4ab9 smbd: Fix calls to create_conn_struct_cwd to be correctly indented.
via d534964 smbd: Split create_conn_struct into a fn that does not change the working dir
via 20d7ec8 VERSION: Bump version number up to 4.0.15...
from bc0f537 VERSION: Disable git snapshots for the 4.0.16 release.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-stable
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
VERSION | 2 +-
WHATSNEW.txt | 118 +++++++++++++-
buildtools/wafadmin/Tools/perl.py | 23 ++-
buildtools/wafsamba/wscript | 3 +-
.../smbdotconf/printing/spoolssarchitecture.xml | 15 ++
lib/replace/wscript | 30 +++-
lib/tevent/tevent_queue.c | 8 +
libcli/smb/smb_constants.h | 8 +
libcli/smbreadline/smbreadline.c | 2 +-
librpc/idl/lsa.idl | 4 +-
librpc/ndr/ndr_nbt.c | 2 +-
pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm | 14 ++
pidl/lib/wscript_build | 35 ++++-
pidl/wscript | 30 +++-
python/samba/tests/dns.py | 30 ++++
script/autobuild.py | 7 +-
source3/Makefile.in | 2 +-
source3/auth/token_util.c | 101 +++++++++++
source3/build/charset.py | 6 +
source3/client/client.c | 2 +-
source3/include/client.h | 2 +-
source3/include/ctdbd_conn.h | 2 +-
source3/include/messages.h | 6 +
source3/include/smb.h | 4 +-
source3/lib/ctdbd_conn.c | 36 ++++-
source3/lib/messages.c | 17 ++
source3/lib/messages_local.c | 38 ++++
.../lib/smbd_tevent_queue.c | 59 ++++---
.../kerberos.h => source3/lib/smbd_tevent_queue.h | 31 ++--
source3/libads/ldap.c | 11 +-
source3/locking/brlock.c | 34 +++--
source3/param/loadparm.c | 2 +-
source3/printing/nt_printing.c | 71 +++++---
source3/printing/printer_list.c | 1 +
source3/printing/queue_process.c | 6 +
source3/printing/spoolssd.c | 39 +++--
source3/rpc_client/rpc_transport_np.c | 57 ++++++-
source3/rpc_server/spoolss/srv_spoolss_nt.c | 1 +
source3/rpc_server/srv_pipe.c | 40 ++---
source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 24 ++--
source3/smbd/globals.h | 1 +
source3/smbd/ipc.c | 10 +-
source3/smbd/msdfs.c | 121 ++++++++++----
source3/smbd/process.c | 91 +++++++++--
source3/smbd/proto.h | 11 +-
source3/smbd/reply.c | 54 +++---
source3/smbd/server.c | 7 +
source3/smbd/server_exit.c | 17 ++-
source3/smbd/service.c | 12 +-
source3/smbd/sesssetup.c | 19 ++-
source3/smbd/smb2_lock.c | 42 ++++--
source3/smbd/smb2_server.c | 16 ++
source3/smbd/smb2_sesssetup.c | 183 ++++++++++++++++++--
source3/smbd/smb2_tcon.c | 180 ++++++++++++++++++--
source3/torture/torture.c | 2 +-
source3/utils/smbfilter.c | 2 +-
source3/winbindd/wb_lookupsids.c | 2 +-
source3/winbindd/winbindd_dual_srv.c | 8 +-
source3/wscript_build | 1 +
source4/cldap_server/cldap_server.c | 2 +-
source4/dns_server/dns_query.c | 14 +-
source4/dns_server/dns_server.c | 8 +-
source4/heimdal_build/config.h | 3 +-
source4/kdc/kdc.c | 2 +-
source4/ldap_server/ldap_server.c | 4 +-
source4/lib/socket/interface.c | 26 +---
source4/rpc_server/dcerpc_server.c | 4 +-
source4/smb_server/service_smb.c | 4 +-
source4/torture/smb2/lock.c | 24 ++--
source4/torture/smb2/notify.c | 88 +++++++++-
source4/web_server/web_server.c | 4 +-
71 files changed, 1506 insertions(+), 379 deletions(-)
create mode 100644 docs-xml/smbdotconf/printing/spoolssarchitecture.xml
copy lib/tevent/tevent_wakeup.c => source3/lib/smbd_tevent_queue.c (53%)
copy lib/replace/system/kerberos.h => source3/lib/smbd_tevent_queue.h (61%)
Changeset truncated at 500 lines:
diff --git a/VERSION b/VERSION
index ee93681..8a57f26 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
########################################################
SAMBA_VERSION_MAJOR=4
SAMBA_VERSION_MINOR=0
-SAMBA_VERSION_RELEASE=16
+SAMBA_VERSION_RELEASE=17
########################################################
# If a official release has a serious bug #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 654a252..8ae476c 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,118 @@
==============================
+ Release Notes for Samba 4.0.17
+ April 15, 2014
+ ==============================
+
+
+This is the latest stable release of Samba 4.0.
+
+
+Changes since 4.0.16:
+---------------------
+
+o Jeremy Allison <jra at samba.org>
+ * BUG 9878: Make "force user" work as expected.
+ * BUG 9942: Fix problem with server taking too long to respond to a
+ MSG_PRINTER_DRVUPGRADE message.
+ * BUG 9993: s3-printing: Fix obvious memory leak in
+ printer_list_get_printer().
+ * BUG 10344: SessionLogoff on a signed connection with an outstanding notify
+ request crashes smbd.
+ * BUG 10431: Fix STATUS_NO_MEMORY response from Query File Posix Lock request.
+ * BUG 10508: smbd: Correctly add remote users into local groups.
+ * BUG 10534: Cleanup messages.tdb record after unclean smbd shutdown.
+
+
+o Christian Ambach <ambi at samba.org>
+ * BUG 9911: Fix build on AIX with IBM XL C/C++ (gettext detection issues).
+ * BUG 10308: Fix String Conversion Errors with Samba 4.1.0 Build on AIX 7.1.
+
+
+o Andrew Bartlett <abartlet at samba.org>
+ * smbd: Split create_conn_struct into a fn that does not change the
+ working dir.
+
+
+o Gregor Beck <gbeck at sernet.de>
+ * BUG 10458: Fix 'wbinfo -i' with one-way trust.
+ * s3:rpc_server: Minor refactoring of process_request_pdu().
+
+
+o Kai Blin <kai at samba.org>
+ * BUG 10471: Don't respond with NXDOMAIN to records that exist with another
+ type.
+
+
+o Alexander Bokovoy <ab at samba.org>
+ * BUG 10504: lsa.idl: Define lsa.ForestTrustCollisionInfo and
+ ForestTrustCollisionRecord as public structs.
+
+
+o Günther Deschner <gd at samba.org>
+ * BUG 10439: Increase max netbios name components.
+
+
+o David Disseldorp <ddiss at samba.org>
+ * BUG 10188: doc: Add "spoolss: architecture" parameter usage.
+ * BUG 10484: Initial FSRVP rpcclient requests fail with
+ NT_STATUS_PIPE_NOT_AVAILABLE.
+
+
+o Daniel Liberman <danielvl at gmail.com>
+ * BUG 10387: 'net ads search' on high latency networks can return a partial
+ list with no error indication.
+
+
+o Stefan Metzmacher <metze at samba.org>
+ * BUG 10344: SessionLogoff on a signed connection with an outstanding notify
+ request crashes smbd.
+ * BUG 10422: max xmit > 64kb leads to segmentation fault.
+ * BUG 10444: smbd_server_connection_terminate("CTDB_SRVID_RELEASE_IP")
+ panics from within ctdbd_migrate() with invalid lock_order.
+ * BUG 10464: samba4 services not binding on IPv6 addresses causing
+ connection delays.
+ * tevent: Fix crash bug in tevent_queue_immediate_trigger().
+
+
+o Garming Sam <garming at catalyst.net.nz>
+ * BUG 10378: dfs: Always call create_conn_struct with root privileges.
+
+
+o Andreas Schneider <asn at cryptomilk.org>
+ * BUG 10472: pidl: waf should have an option for the dir to install perl
+ files and do not glob.
+ * BUG 10474: s3-spoolssd: Don't register spoolssd if epmd is not running.
+ * BUG 10481: s3-rpc_server: Fix handling of fragmented rpc requests.
+
+
+o Gustavo Zacarias <gustavo at zacarias.com.ar>
+ * BUG 10506: Make 'smbreadline' build with readline 6.3.
+
+
+######################################################################
+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.0 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.0.16
March 11, 2014
==============================
@@ -61,8 +175,8 @@ database (https://bugzilla.samba.org/).
======================================================================
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
+
==============================
Release Notes for Samba 4.0.15
diff --git a/buildtools/wafadmin/Tools/perl.py b/buildtools/wafadmin/Tools/perl.py
index a6787a8..8f13e28 100644
--- a/buildtools/wafadmin/Tools/perl.py
+++ b/buildtools/wafadmin/Tools/perl.py
@@ -98,12 +98,27 @@ def check_perl_ext_devel(conf):
conf.env.EXTUTILS_TYPEMAP = read_out('print "$Config{privlib}/ExtUtils/typemap"')
conf.env.perlext_PATTERN = '%s.' + read_out('print $Config{dlext}')[0]
- if getattr(Options.options, 'perlarchdir', None):
- conf.env.ARCHDIR_PERL = Options.options.perlarchdir
+ if getattr(Options.options, 'perl_vendorarch_dir', None):
+ conf.env.PERL_VENDORARCH_DIR = Options.options.perl_vendorarch_dir
else:
- conf.env.ARCHDIR_PERL = read_out('print $Config{sitearch}')[0]
+ conf.env.PERL_VENDORARCH_DIR = read_out('print $Config{vendorarch}')[0]
+
+ if getattr(Options.options, 'perl_vendorlib_dir', None):
+ conf.env.PERL_VENDORLIB_DIR = Options.options.perl_vendorlib_dir
+ else:
+ conf.env.PERL_VENDORLIB_DIR = read_out('print $Config{vendorlib}')[0]
def set_options(opt):
opt.add_option("--with-perl-binary", type="string", dest="perlbinary", help = 'Specify alternate perl binary', default=None)
- opt.add_option("--with-perl-archdir", type="string", dest="perlarchdir", help = 'Specify directory where to install arch specific files', default=None)
+ opt.add_option("--with-perl-vendorarch",
+ type="string",
+ dest="perl_vendorarch_dir",
+ help = ('Specify directory where to install arch specific files'),
+ default=None)
+
+ opt.add_option("--with-perl-vendorlib",
+ type="string",
+ dest="perl_vendorlib_dir",
+ help = ('Specify directory where to install vendor specific files'),
+ default=None)
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index fe2e515..7984227 100755
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -80,8 +80,7 @@ def set_options(opt):
match = ['Checking for library iconv', 'Checking for iconv_open', 'Checking for header iconv.h'])
opt.add_option('--with-gettext',
help='additional directory to search for gettext',
- action='store', dest='gettext_location', default='/usr/local',
- match = ['Checking for library intl', 'Checking for header libintl.h'])
+ action='store', dest='gettext_location', default='None')
opt.add_option('--without-gettext',
help=("Disable use of gettext"),
action="store_true", dest='disable_gettext', default=False)
diff --git a/docs-xml/smbdotconf/printing/spoolssarchitecture.xml b/docs-xml/smbdotconf/printing/spoolssarchitecture.xml
new file mode 100644
index 0000000..5ce9f13
--- /dev/null
+++ b/docs-xml/smbdotconf/printing/spoolssarchitecture.xml
@@ -0,0 +1,15 @@
+<samba:parameter name="spoolss: architecture"
+ context="G"
+ type="string"
+ advanced="1"
+ developer="1"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>Windows spoolss print clients only allow association of server-side drivers
+ with printers when the driver architecture matches the advertised print server
+ architecture. Samba's spoolss print server architecture can be changed using
+ this parameter.</para>
+</description>
+<value type="default">Windows NT x86</value>
+<value type="example">Windows x64</value>
+</samba:parameter>
diff --git a/lib/replace/wscript b/lib/replace/wscript
index e4d8b6b..61a25ec 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -346,10 +346,19 @@ removeea setea
headers='netinet/in.h arpa/nameser.h resolv.h')
+ # try to find libintl (if --without-gettext is not given)
conf.env.intl_libs=''
if not Options.options.disable_gettext:
+ # any extra path given to look at?
+ if not Options.options.gettext_location == 'None':
+ conf.env['CFLAGS'].extend(["-I%s" % Options.options.gettext_location]);
+ conf.env['LDFLAGS'].extend(["-L%s" % Options.options.gettext_location]);
+ else:
+ conf.env['CFLAGS'].extend(["-I/usr/local"]);
+ conf.env['LDFLAGS'].extend(["-L/usr/local"]);
conf.CHECK_HEADERS('libintl.h')
conf.CHECK_LIB('intl')
+ conf.CHECK_DECLS('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', headers="libintl.h")
# *textdomain functions are not strictly necessary
conf.CHECK_FUNCS_IN('bindtextdomain textdomain bind_textdomain_codeset',
'', checklibc=True, headers='libintl.h')
@@ -368,18 +377,27 @@ removeea setea
else:
# Some hosts need lib iconv for linking with lib intl
# So we try with flags just in case it helps.
- oldflags = conf.env['EXTRA_LDFLAGS'];
- conf.env['EXTRA_LDFLAGS'].extend("-liconv")
+ oldflags = list(conf.env['EXTRA_LDFLAGS']);
+ conf.env['EXTRA_LDFLAGS'].extend(["-liconv"])
conf.CHECK_FUNCS_IN('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset',
'intl', checklibc=False, headers='libintl.h')
conf.env['EXTRA_LDFLAGS'] = oldflags
if conf.env['HAVE_GETTEXT'] and conf.env['HAVE_DGETTEXT']:
# save for dependency definitions
conf.env.intl_libs='iconv intl'
- else:
- conf.fatal('library gettext not found, try specifying the path to ' +
- 'it with --with-gettext=</path/to/gettext> or ' +
- '--without-gettext to build without''')
+
+ # did we find both prototypes and a library to link against?
+ # if not, unset the detected values (see Bug #9911)
+ if not (conf.env['HAVE_GETTEXT'] and conf.env['HAVE_DECL_GETTEXT']):
+ conf.undefine('HAVE_GETTEXT')
+ conf.undefine('HAVE_DECL_GETTEXT')
+ if not (conf.env['HAVE_DGETTEXT'] and conf.env['HAVE_DECL_DGETTEXT']):
+ conf.undefine('HAVE_DGETTEXT')
+ conf.undefine('HAVE_DECL_DGETTEXT')
+
+ # did the user insist on gettext (--with-gettext)?
+ if Options.options.gettext_location != 'None' and (not conf.env['HAVE_GETTEXT'] or not conf.env['HAVE_DGETTEXT']):
+ conf.fatal('library gettext not found at specified location')
conf.CHECK_FUNCS_IN('pthread_create', 'pthread', checklibc=True, headers='pthread.h')
diff --git a/lib/tevent/tevent_queue.c b/lib/tevent/tevent_queue.c
index 4750675..e324680 100644
--- a/lib/tevent/tevent_queue.c
+++ b/lib/tevent/tevent_queue.c
@@ -140,6 +140,14 @@ static void tevent_queue_immediate_trigger(struct tevent_context *ev,
return;
}
+ if (!q->list) {
+ return;
+ }
+
+ if (!q->list) {
+ return;
+ }
+
q->list->triggered = true;
q->list->trigger(q->list->req, q->list->private_data);
}
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index bcfd84e..639bd7c 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -208,6 +208,14 @@ enum smb_signing_setting {
#define NEGOTIATE_SECURITY_SIGNATURES_ENABLED 0x04
#define NEGOTIATE_SECURITY_SIGNATURES_REQUIRED 0x08
+/*
+ * The negotiated buffer size for non LARGE_READX/WRITEX
+ * should be limited to uint16_t and has to be at least
+ * 500, which is the default for MinClientBufferSize on Windows.
+ */
+#define SMB_BUFFER_SIZE_MIN 500
+#define SMB_BUFFER_SIZE_MAX 65535
+
/* Capabilities. see ftp.microsoft.com/developr/drg/cifs/cifs/cifs4.txt */
#define CAP_RAW_MODE 0x00000001
diff --git a/libcli/smbreadline/smbreadline.c b/libcli/smbreadline/smbreadline.c
index cff25a7..80e10b0 100644
--- a/libcli/smbreadline/smbreadline.c
+++ b/libcli/smbreadline/smbreadline.c
@@ -141,7 +141,7 @@ char *smb_readline(const char *prompt, void (*callback)(void),
#if HAVE_DECL_RL_EVENT_HOOK
if (callback)
- rl_event_hook = (Function *)callback;
+ rl_event_hook = (rl_hook_func_t *)callback;
#endif
ret = readline(prompt);
if (ret && *ret)
diff --git a/librpc/idl/lsa.idl b/librpc/idl/lsa.idl
index d8f2649..80efbd5 100644
--- a/librpc/idl/lsa.idl
+++ b/librpc/idl/lsa.idl
@@ -1328,14 +1328,14 @@ import "misc.idl", "security.idl";
[default] uint32 flags;
} lsa_ForestTrustCollisionFlags;
- typedef struct {
+ typedef [public] struct {
uint32 index;
lsa_ForestTrustCollisionRecordType type;
[switch_is(type)] lsa_ForestTrustCollisionFlags flags;
lsa_String name;
} lsa_ForestTrustCollisionRecord;
- typedef struct {
+ typedef [public] struct {
uint32 count;
[size_is(count)] lsa_ForestTrustCollisionRecord **entries;
} lsa_ForestTrustCollisionInfo;
diff --git a/librpc/ndr/ndr_nbt.c b/librpc/ndr/ndr_nbt.c
index f2a1ca3..842e972 100644
--- a/librpc/ndr/ndr_nbt.c
+++ b/librpc/ndr/ndr_nbt.c
@@ -27,7 +27,7 @@
#include "../libcli/netlogon/netlogon.h"
/* don't allow an unlimited number of name components */
-#define MAX_COMPONENTS 10
+#define MAX_COMPONENTS 128
/**
print a nbt string
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
index c796b46..fed94cd 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
@@ -693,6 +693,20 @@ sub ParseFunction_Sync($$$$)
}
$self->pidl("");
+ $self->pidl("/* Out parameters */");
+ foreach my $e (@{$fn->{ELEMENTS}}) {
+ next unless grep(/out/, @{$e->{DIRECTION}});
+
+ $self->ParseCopyArgument($fn, $e, "r.out.", "_");
+ }
+ $self->pidl("");
+
+ if (defined($fn->{RETURN_TYPE})) {
+ $self->pidl("/* Result */");
+ $self->pidl("ZERO_STRUCT(r.out.result);");
+ $self->pidl("");
+ }
+
$self->pidl("status = dcerpc_$name\_r(h, mem_ctx, &r);");
$self->pidl("if (!NT_STATUS_IS_OK(status)) {");
$self->indent;
diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build
index eb5f1e0..5023e07 100644
--- a/pidl/lib/wscript_build
+++ b/pidl/lib/wscript_build
@@ -1,4 +1,37 @@
#!/usr/bin/env python
# install the pidl modules
-bld.INSTALL_WILDCARD('${DATAROOTDIR}/perl5', '**/*.pm', flat=False)
+bld.INSTALL_FILES(bld.env.PERL_VENDORLIB_DIR,
+ '''
+ Parse/Pidl.pm
+ Parse/Pidl/Samba4.pm
+ Parse/Pidl/CUtil.pm
+ Parse/Pidl/Expr.pm
+ Parse/Pidl/Wireshark/Conformance.pm
+ Parse/Pidl/Wireshark/NDR.pm
+ Parse/Pidl/ODL.pm
+ Parse/Pidl/Dump.pm
+ Parse/Pidl/Util.pm
+ Parse/Pidl/Samba4/Header.pm
+ Parse/Pidl/Samba4/COM/Header.pm
+ Parse/Pidl/Samba4/COM/Proxy.pm
+ Parse/Pidl/Samba4/COM/Stub.pm
+ Parse/Pidl/Samba4/TDR.pm
+ Parse/Pidl/Samba4/NDR/Server.pm
+ Parse/Pidl/Samba4/NDR/Client.pm
+ Parse/Pidl/Samba4/NDR/Parser.pm
+ Parse/Pidl/Samba4/Python.pm
+ Parse/Pidl/Samba4/Template.pm
+ Parse/Pidl/IDL.pm
+ Parse/Pidl/Typelist.pm
+ Parse/Pidl/Samba3/ClientNDR.pm
+ Parse/Pidl/Samba3/ServerNDR.pm
+ Parse/Pidl/Compat.pm
+ Parse/Pidl/NDR.pm
+ ''',
+ flat=False)
+
+if not bld.CONFIG_SET('USING_SYSTEM_PARSE_YAPP_DRIVER'):
+ bld.INSTALL_FILES(bld.env.PERL_VENDORLIB_DIR,
+ 'Parse/Yapp/Driver.pm',
+ flat=False)
diff --git a/pidl/wscript b/pidl/wscript
index 7a25734..4965870 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -3,11 +3,38 @@
import os, sys, Logs
from samba_utils import MODE_755
+# This function checks if a perl module is installed on the system.
+def check_system_perl_module(conf, module, version=None):
+ bundle_name = module.replace('::', '_')
+ module_check = module
+ found = False
+
+ # Create module string with version
+ if version:
+ module_check = module + ' ' + str(version)
+
+ # Check if we have to bundle it.
+ if conf.LIB_MUST_BE_BUNDLED(bundle_name.lower()):
+ return False
+
+ # Check for system perl module
+ if not conf.check_perl_module(module_check):
+ return False
+
+ conf.define('USING_SYSTEM_%s' % bundle_name.upper(), 1)
+
+ return True
+
def set_options(opt):
opt.tool_options('perl')
def configure(conf):
conf.check_tool('perl')
+ conf.check_perl_ext_devel()
+
+ # Check if perl(Parse::Yapp::Driver) is available.
+ check_system_perl_module(conf, "Parse::Yapp::Driver", 1.05)
+
# we need a recent version of MakeMaker to get the right man page names
if conf.CHECK_PERL_MANPAGE():
conf.env.PERLMAN1EXT = conf.CHECK_PERL_MANPAGE(section='1')
@@ -26,9 +53,6 @@ def build(bld):
if not bld.CONFIG_SET('HAVE_PERL_MAKEMAKER'):
return
- pidl_src = ['pidl']
- pidl_src.extend(bld.path.ant_glob('lib/**/*.pm').split())
-
pidl_manpages = {
'pidl': 'man1/pidl.${PERLMAN1EXT}',
'lib/Parse/Pidl/NDR.pm': 'man3/Parse::Pidl::NDR.${PERLMAN3EXT}',
diff --git a/python/samba/tests/dns.py b/python/samba/tests/dns.py
index 0ac9cf4..f2c5685 100644
--- a/python/samba/tests/dns.py
+++ b/python/samba/tests/dns.py
@@ -171,6 +171,36 @@ class TestSimpleQueries(DNSTest):
self.assertEquals(response.answers[0].rdata,
os.getenv('SERVER_IP'))
+ def test_one_mx_query(self):
+ "create a query packet causing an empty RCODE_OK answer"
+ p = self.make_name_packet(dns.DNS_OPCODE_QUERY)
+ questions = []
+
+ name = "%s.%s" % (os.getenv('SERVER'), self.get_dns_domain())
+ q = self.make_name_question(name, dns.DNS_QTYPE_MX, dns.DNS_QCLASS_IN)
+ print "asking for ", q.name
+ questions.append(q)
+
--
Samba Shared Repository
More information about the samba-cvs
mailing list