[SCM] Samba Shared Repository - branch v4-1-test updated
Karolin Seeger
kseeger at samba.org
Mon Mar 10 11:35:05 MDT 2014
The branch, v4-1-test has been updated
via 705595f s3-spoolssd: Don't register spoolssd if epmd is not running.
via 51241bb s3-vfs: Fix stream_depot vfs module on btrfs.
via 70455f0 s3:winbindd: avoid directly asking a trusted domain in wb_lookupsids*()
via 64bb989 s3:winbindd: fix _wbint_LookupSids() on error
via 0acd76f pidl:NDR/Client: fix dcerpc_function() with [out,ref] pointers
via 3d5ae09 s3: smbd: Ensure brl_get_locks_internal() always returns a valid struct byte_range_lock even if there are no locks.
via c62eec5 doc: add "spoolss: architecture" parameter usage
via d94e563 s3-printing: Fix obvious memory leak in printer_list_get_printer().
via 440052f rpc_client: retry open on STATUS_PIPE_NOT_AVAILABLE
via 729b124 s3:smbd: avoid invalid lock_order panic triggered by "CTDB_SRVID_RELEASE_IP"
via cd17ba7 s3:lib/ctdbd_conn: let release_ip_handler return bool
via 2942419 s3:smbd: maintain smbd_server_connection->status
via 540cfe1 s3:smbd: simplify exit_server_common()
via 7318632 s3: ldap client can return NT_STATUS_OK when an error occurs in a paged search.
via ad1dac1 waf: improve iconv checks
via f2774ce s3:libsmb: call smbXcli_tcon_set_fs_attributes() directly
via 082c5ea s3:libsmb: remove unused cli_state->case_sensitive
via 2acadbb s3:libsmb: remove unused cli_state->dfsroot
via ee8089b s3:libsmb: add SMB2/3 support to cli_dfs_get_referral()
via c35d8a3 s3/libsmb: make use of smbXcli_tcon_is_dfs_share()
via e55b6fb s3/libsmb: Use smbXcli_conn_dfs_supported instead of test on CAP_DFS
via e5b0378 s3:libsmb: don't pass down FLAG_CASELESS_PATHNAMES and FLAGS2_DFS_PATHNAMES anymore
via 75acb84 s3:libsmb: call smbXcli_tcon_{get,set}_fs_attributes() from cli_set_case_sensitive()
via e5b7647 libcli/smb: add SMB2_HDR_FLAG_DFS for SMB2 Create operations on dfs shares
via 66de913 libcli/smb: add FLAG_CASELESS_PATHNAMES based on FILE_CASE_SENSITIVE_SEARCH to smb1 requests
via c711e5b libcli/smb: move Filesystem Attributes defines to smb_constants.h
via 748b205 libcli/smb: add FLAGS2_DFS_PATHNAMES for SMB1 operations against dfs shares
via 18d7628 libcli/smb: add smbXcli_tcon_{set,get}_fs_attributes()
via 27bad7d libcli/smb: add smbXcli_tcon_is_dfs_share()
via 2bd871c libcli/smb: Introduce smbXcli_conn_dfs_supported
via 26f03f1 s3:libsmb: make use of smb1cli_tcon_set_values()
via 3b0e363 s3/libsmb: Use smbXcli_conn_use_unicode instead of smb1 specific test
via 195a64c heimdal_build: only enable libintl functions if everything was found
via bbbeed6 waf:lib/replace fix iconv checks on HP/UX
via 8a0b5a4 waf:lib/replace gettext configure checks
via 57df0d3 waf:lib/replace fix gettext detection
via 7a64fb0 waf:lib/replace change detection of gettext
via 05f917c waf:lib/replace fix up libintl related checks
via 540da46 waf:lib/replace correct detection of libiconv
via ec1dacc s3: printing: Fix problem with server taking too long to respond to a MSG_PRINTER_DRVUPGRADE message.
from ce98b19 librpc/nbt: increase MAX_COMPONENTS limit for nbt_names.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-1-test
- Log -----------------------------------------------------------------
commit 705595f80cd8bd362ef59a470e1ef9c0555934c5
Author: Andreas Schneider <asn at samba.org>
Date: Thu Feb 27 09:58:27 2014 +0100
s3-spoolssd: Don't register spoolssd if epmd is not running.
https://bugzilla.samba.org/show_bug.cgi?id=10474
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
(cherry picked from commit 562ade624a78a11a5af0f26b04df93d76d6166bd)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-1-test): Mon Mar 10 18:34:41 CET 2014 on sn-devel-104
commit 51241bb3cb8941c5125c5c84f36932f006242b88
Author: Andreas Schneider <asn at samba.org>
Date: Fri Nov 8 15:41:18 2013 +0100
s3-vfs: Fix stream_depot vfs module on btrfs.
Checking if the directory is empty using 'nlink == 2' only checks if
there are no subdirectories. It doesn't indicate if there are files in
the directory. However checking link count for no subdirectories is
wrong and applications shouldn't rely on it, see:
https://lkml.org/lkml/2012/2/1/756
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10467
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
(cherry picked from commit 654b784e9c9c3563afd1af853f4795117c258e56)
commit 70455f0382430fed1d73597a0010d03212524597
Author: Gregor Beck <gbeck at sernet.de>
Date: Thu Feb 20 11:25:53 2014 +0100
s3:winbindd: avoid directly asking a trusted domain in wb_lookupsids*()
As a domain member we should always use a DC of our own domain.
It would be possible to pass all sids in one single dcerpc_wbint_LookupSids()
call. For now we just fix bug.
Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10458
Signed-off-by: Gregor Beck <gbeck at sernet.de>
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 66fb0ce9557553a4c01607b517e65ac4c93841d0)
commit 64bb9894f1189d919a57977ede79579769bd048e
Author: Gregor Beck <gbeck at sernet.de>
Date: Thu Feb 20 13:14:31 2014 +0100
s3:winbindd: fix _wbint_LookupSids() on error
We need to make sure that r->out.domains remains valid,
otherwise we're not able to marshall the response.
Note that wbint_LookupSids() has [out,ref] lsa_RefDomainList *domains,
while lsa_LookupSids() has [out,ref] lsa_RefDomainList **domains.
Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10458
Signed-off-by: Gregor Beck <gbeck at sernet.de>
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit 3413e64149702136429d7b5acaa7a52c49abf564)
commit 0acd76fbce92ac9d50a178ed436c3db37e97882e
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Sep 26 01:20:10 2013 +0200
pidl:NDR/Client: fix dcerpc_function() with [out,ref] pointers
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
(cherry picked from commit f50b561336c7b6c08300e6e477859d1f9fab62c2)
commit 3d5ae093e3ecebf620569bdcd7f7232fc260b460
Author: Jeremy Allison <jra at samba.org>
Date: Thu Feb 27 16:19:53 2014 -0800
s3: smbd: Ensure brl_get_locks_internal() always returns a valid struct byte_range_lock even if there are no locks.
brl_get_locks_internal() currently returns NULL when it can't
find any byte range locks on the file. This is an error - it
should return a valid struct byte_range_lock containing num_locks == 0
so it can be cached.
Returning NULL when there are no locks causes POSIX lock
tests to fail returning NT_STATUS_NO_MEMORY (as it thinks
it can't allocate the struct) instead of NT_STATUS_OK.
This is a back-port of git commit abf08ed544ce05ea5a6e6ea2e531b6a2d97e15cc
that went into master.
Fixes bug:
Bug 10431 - STATUS_NO_MEMORY response from Query File Posix Lock request
https://bugzilla.samba.org/show_bug.cgi?id=10431
Signed-off-by: Jeremy Allison <jra at samba.org>
commit c62eec5f51fd43767bb55173ee51175e13722448
Author: David Disseldorp <ddiss at samba.org>
Date: Mon Oct 14 12:01:58 2013 +0200
doc: add "spoolss: architecture" parameter usage
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.
Signed-off-by: David Disseldorp <ddiss at samba.org>
Reviewed-by: Günther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Günther Deschner <gd at samba.org>
Autobuild-Date(master): Wed Oct 16 17:12:34 CEST 2013 on sn-devel-104
(cherry picked from commit b92937e64ed7ce3c7cdd4da0e263c7a53da45c49)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10188
spoolss: architecture is undocumented
commit d94e56393d4c14a3e42c1b7589e21f9768facb18
Author: Jeremy Allison <jra at samba.org>
Date: Mon Feb 24 16:18:31 2014 -0800
s3-printing: Fix obvious memory leak in printer_list_get_printer().
https://bugzilla.samba.org/show_bug.cgi?id=9993
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ira Cooper <ira at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Tue Feb 25 13:19:37 CET 2014 on sn-devel-104
(cherry picked from commit 148bbdd8d04400b5d873f636671dd443952ca04f)
commit 440052f5e83d9bc2e823d02eb43c3b7d03d114b8
Author: David Disseldorp <ddiss at samba.org>
Date: Mon Mar 3 19:49:35 2014 +0100
rpc_client: retry open on STATUS_PIPE_NOT_AVAILABLE
Windows Server starts some named pipe services on demand, and responds
to initial open requests with STATUS_PIPE_NOT_AVAILABLE. The FssagentRpc
named pipe on Windows Server 2012 exhibits this behaviour.
This change sees rpcclient retry named pipe open requests when the
server responds with STATUS_PIPE_NOT_AVAILABLE. The retry logic is
contained in an asynchronous tevent_timer callback, to allow for
non-blocking callers.
Signed-off-by: David Disseldorp <ddiss at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit ebe6627c1f0e6b488a0c456860a055fd5701e84d)
[ddiss at samba.org: rebasead for 4.1 without 46d29d46bc065d51e3f7ca6892]
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10484
Initial FSRVP rpcclient requests fail with NT_STATUS_PIPE_NOT_AVAILABLE
commit 729b1241384666bea5ac342446f93f6563fbff3f
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Feb 13 15:36:27 2014 +0100
s3:smbd: avoid invalid lock_order panic triggered by "CTDB_SRVID_RELEASE_IP"
If smbd_server_connection_terminate("CTDB_SRVID_RELEASE_IP") is triggered from
within ctdbd_migrate(), we got a smb_panic complaining about invalid
lock_order, as ctdbd_migrate is called from dbwrap_fetch_locked().
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10444
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Fri Feb 21 14:51:51 CET 2014 on sn-devel-104
(cherry picked from commit 33f10d06baf44e31d558bc5bd926c886915322cc)
commit cd17ba75f2be6fa379c54d220762eb2da11f6c1f
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Feb 17 11:57:52 2014 +0100
s3:lib/ctdbd_conn: let release_ip_handler return bool
If it returns true the passed ip address matched and we
let a nested ctdb operation fail with NT_STATUS_ADDRESS_CLOSED.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
(cherry picked from commit 9677fae6aab26d2bf0884dc31516d2dcd8840c03)
commit 294241914f40f93d82c158f0fa2b143bc9b9a093
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Feb 17 12:01:12 2014 +0100
s3:smbd: maintain smbd_server_connection->status
If this isn't NT_STATUS_OK, we skip any io on the socket.
This avoids possible problems during shutdown.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
(cherry picked from commit 52ccb40d595fc80bfa53b0b9cd75ffb902369681)
commit 540cfe1fa6c6ea0590375fca83b4b7716346349e
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Feb 17 12:05:42 2014 +0100
s3:smbd: simplify exit_server_common()
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
(cherry picked from commit 58c71bee40bb91868fc69d8f7fa640db0e33efae)
commit 73186325be9c69e51d79f65e8682ac85e43dd9e6
Author: Daniel Liberman <danielvl at gmail.com>
Date: Tue Jan 21 16:25:41 2014 -0800
s3: ldap client can return NT_STATUS_OK when an error occurs in a paged search.
"Inside ads_do_search_all_args(), if the first call to ads_do_paged_search_args()
fails, the proper error status is returned.
But, if the execution is already inside the loop to get all the accounts doing
several calls to ads_do_paged_search_args(), and one of these calls times out,
the status returned is from the *first* call, so success. This causes
net_ads_search() to interpret the return from ads_do_search_retry() as
success and print all the accounts returned, but it’s only a subset."
Also ensure we free previously returned results on error
in subsequent fetches.
https://bugzilla.samba.org/show_bug.cgi?id=10387
Signed-off-by: Daniel Liberman <danielvl at gmail.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe at gmail.com>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Thu Jan 23 01:40:54 CET 2014 on sn-devel-104
(cherry picked from commit b04e8b7557b82a4b96cf74db04742fb017edb3ba)
commit ad1dac1610c18d1e74d9dfc257cee49cb5552c1e
Author: Christian Ambach <ambi at samba.org>
Date: Wed Dec 4 22:50:11 2013 +0100
waf: improve iconv checks
there are broken iconv implementations around (e.g. on AIX) that you
can compile against but that refuse any mapping requests
make sure we do the same as the autoconf-based build did and
fall back to our own code
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10308
Signed-off-by: Christian Ambach <ambi at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
(cherry picked from commit 15b2d1a658b3fc428c20a7a461168f464951f40f)
(cherry picked from commit f5cbfd6ce5e5a0977e5c1a53046ee883b3431246)
commit f2774ce7b5aa44718d7071492bae9259973fa138
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Sep 27 06:06:32 2013 +0200
s3:libsmb: call smbXcli_tcon_set_fs_attributes() directly
We should try to set all attributes we got and not just
FILE_CASE_SENSITIVE_SEARCH.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
Autobuild-User(master): Michael Adam <obnox at samba.org>
Autobuild-Date(master): Thu Oct 17 19:02:03 CEST 2013 on sn-devel-104
(cherry picked from commit 2474455b7f924ae19ea8897d5e506076f7e77419)
commit 082c5ea79831786c172e896f883baf3269fa3888
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Sep 27 05:45:21 2013 +0200
s3:libsmb: remove unused cli_state->case_sensitive
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit 307abd61df586baac6cb0bef4272c633c526a7bf)
commit 2acadbb5b85c941cfab39f8ad83ebc0e72c22268
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Sep 18 09:40:08 2013 +0200
s3:libsmb: remove unused cli_state->dfsroot
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit e20c66d78099bcf5d965bd9d59669fe393481517)
commit ee8089bfd1afdea35c98339b3ff4c291fc43b24f
Author: Stefan Metzmacher <metze at samba.org>
Date: Sun Oct 13 16:54:18 2013 +0200
s3:libsmb: add SMB2/3 support to cli_dfs_get_referral()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit c5c717fe3157224a8aba48a30bace889e7956d31)
commit c35d8a3d12ad57169916972d4bdcdecaa451ead2
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Sep 27 05:44:33 2013 +0200
s3/libsmb: make use of smbXcli_tcon_is_dfs_share()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit 37f0e3722cea3ff433d2c95d697e38693c676ae0)
commit e55b6fb64e456808a407d900d4f599be3111595f
Author: Luk Claes <luk at debian.org>
Date: Fri May 17 20:46:24 2013 +0200
s3/libsmb: Use smbXcli_conn_dfs_supported instead of test on CAP_DFS
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Luk Claes <luk at debian.org>
Reviewed-by: Michael Adam <obnox at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 114e33717df8b49239ac08399a379a8363d33b85)
commit e5b03789658f123971688830bbb157be9668c4c3
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Sep 27 05:34:12 2013 +0200
s3:libsmb: don't pass down FLAG_CASELESS_PATHNAMES and FLAGS2_DFS_PATHNAMES anymore
They're now handled at the smbXcli_conn and smbXcli_tcon layer.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit 451b11251f7f3a517f94c5d57dab327a30bab52f)
commit 75acb8404503d82629fa4339bf986b3ad409d57c
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Sep 27 05:11:45 2013 +0200
s3:libsmb: call smbXcli_tcon_{get,set}_fs_attributes() from cli_set_case_sensitive()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit 226dde2879ff8b4b366bf3d9f44f59e7fdc343c0)
commit e5b7647a6bc308a517e16e676ec4ee7912c6c60d
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Sep 18 03:50:42 2013 +0200
libcli/smb: add SMB2_HDR_FLAG_DFS for SMB2 Create operations on dfs shares
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit 60f16bacdc242a8512df352dcdd625661e4b25ad)
commit 66de9134420c1a6743369cc54958cc94e9128a26
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Sep 27 05:31:07 2013 +0200
libcli/smb: add FLAG_CASELESS_PATHNAMES based on FILE_CASE_SENSITIVE_SEARCH to smb1 requests
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit b16b469f3fa3766c19ca30f377cc7de6782c05e6)
commit c711e5b6f08edc91716716e7627b1918471400d5
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Sep 27 05:30:03 2013 +0200
libcli/smb: move Filesystem Attributes defines to smb_constants.h
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit e6eb6b9e9494d1c8db311e5b967b0da4d75c45aa)
commit 748b205f9140820482fa91760c6b195bb74cbc3a
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Sep 18 03:31:33 2013 +0200
libcli/smb: add FLAGS2_DFS_PATHNAMES for SMB1 operations against dfs shares
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit 44224cd40fcec262085423577de9eede27a4a22a)
commit 18d7628b1104a55a4266cd1e5fafe18a080cadbd
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Sep 27 05:02:09 2013 +0200
libcli/smb: add smbXcli_tcon_{set,get}_fs_attributes()
These are the attributes returned from the FileFsAttributeInformation
request.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit 1c4e95cbd88e6122c1e2fb07b119abf225c94fff)
commit 27bad7dac4124a7999c4787757af11a3e6f6eac8
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Sep 13 11:07:32 2013 +0200
libcli/smb: add smbXcli_tcon_is_dfs_share()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit e0fe97c543b2845e3515ffc2c638e4252164beed)
commit 2bd871c5f68ce2f8e5e5d7c3e0a4938740135f71
Author: Luk Claes <luk at debian.org>
Date: Fri May 17 20:41:45 2013 +0200
libcli/smb: Introduce smbXcli_conn_dfs_supported
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Luk Claes <luk at debian.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit 24e7be87d17910c1f4170ecd5fe2d2a8b1419ba5)
commit 26f03f117c76c5b16a2183f4c6b96602b2c83af4
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Sep 13 09:10:42 2013 +0200
s3:libsmb: make use of smb1cli_tcon_set_values()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit a2b38e0bc94d329963cdad76e6861d3234ede8d4)
commit 3b0e3635fe000a8e333717c9c88b8bc52380ff38
Author: Luk Claes <luk at debian.org>
Date: Fri May 17 20:13:50 2013 +0200
s3/libsmb: Use smbXcli_conn_use_unicode instead of smb1 specific test
Signed-off-by: Luk Claes <luk at debian.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
(cherry picked from commit d9d5744bc3dd7e18ac6dc23917d903d5e991ab8d)
commit 195a64c4aa2eb13c579b086999f45f661c24ea15
Author: Christian Ambach <ambi at samba.org>
Date: Wed Feb 19 22:17:01 2014 +0100
heimdal_build: only enable libintl functions if everything was found
do not rely on intl.h being available but also on the functions being usable
This should fix the build on HP-UX
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911
Signed-off-by: Christian Ambach <ambi at samba.org>
Change-Id: I5dd88d2d5216b778624778455cca99b32d0be58f
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Thu Feb 20 01:28:24 CET 2014 on sn-devel-104
(cherry picked from commit 8f0d06fa5e654f647664727db6f12901579ec2c7)
commit bbbeed69f708aed8f15863d5c4587c589b3f46d4
Author: Christian Ambach <ambi at samba.org>
Date: Wed Jan 29 20:48:38 2014 +0100
waf:lib/replace fix iconv checks on HP/UX
we need to copy away the list of LDFLAGS
to be tried before modifying it instead of
just creating a new reference and then continuing
with a modified list while it should have been
reset back to the original value
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911
Signed-off-by: Christian Ambach <ambi at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Thu Feb 13 02:01:03 CET 2014 on sn-devel-104
(cherry picked from commit 6a7c420a79cc1258528f152f4de9a0608767729f)
commit 8a0b5a4e4c084155a8e6d919c680d4ffded3cf70
Author: Christian Ambach <ambi at samba.org>
Date: Thu Jul 25 19:41:02 2013 +0200
waf:lib/replace gettext configure checks
Make sure we only try to work with gettext if we found
the prototypes and were able to link
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911
Signed-off-by: Christian Ambach <ambi at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Christian Ambach <ambi at samba.org>
Autobuild-Date(master): Fri Jan 17 19:30:33 CET 2014 on sn-devel-104
(cherry picked from commit da891e2101c568d2f0b9a2bda78702826ea68f3c)
commit 57df0d38514985f68bb6427999c198220fd98a1e
Author: Christian Ambach <ambi at samba.org>
Date: Thu Dec 12 22:10:36 2013 +0100
waf:lib/replace fix gettext detection
if the user has specified a path for gettext, add it to CFLAGS and LDFLAGS
so we can find it during configure and build
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911
Signed-off-by: Christian Ambach <ambi at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
(cherry picked from commit 31db0c8acdd68f396417e1f6504a91a40295bc89)
commit 7a64fb0d415cc55bd483908c9d5b98bb581581c3
Author: Christian Ambach <ambi at samba.org>
Date: Thu Dec 12 22:12:07 2013 +0100
waf:lib/replace change detection of gettext
convert this to an automatic check: if no option is given, try to find gettext
and if found, use it
if user has specified --with-gettext, then bail out if it could not be found
in case of --without-gettext, skip all gettext related configure checks
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911
Signed-off-by: Christian Ambach <ambi at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
(cherry picked from commit a83f491810d34cc8b6eb4b0f40bbbb1440e0f84d)
commit 05f917c2ff33371cf02a3e8203e5d7018701218d
Author: Christian Ambach <ambi at samba.org>
Date: Thu Jan 2 22:23:16 2014 +0100
waf:lib/replace fix up libintl related checks
on a default installation of AIX, libintl.a exists but
libintl.h does not
So check for the declarations of those functions as well
to make sure that the build works.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911
Signed-off-by: Christian Ambach <ambi at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
(cherry picked from commit df6ddcfbfcd33274c1b768ce26829b0ad9278cd0)
commit 540da46f06f6a3b142a6e792c1db8255bf1f57c7
Author: Christian Ambach <ambi at samba.org>
Date: Thu Jan 2 23:28:20 2014 +0100
waf:lib/replace correct detection of libiconv
add -liconv as a complete command line argument,
not all characters on their own
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911
Signed-off-by: Christian Ambach <ambi at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
(cherry picked from commit 1a42ff7d8db63b26e2beb43268a1c4664723358e)
commit ec1dacc552465f15546f095ab080606963f842eb
Author: Jeremy Allison <jra at samba.org>
Date: Wed Feb 12 10:13:19 2014 -0800
s3: printing: Fix problem with server taking too long to respond to a MSG_PRINTER_DRVUPGRADE message.
Receiving a MSG_PRINTER_DRVUPGRADE causes
smbd to iterate over all printers looking
for ones that uses the driver. This is a very
expensive operation requiring a read of all
registry printer parameters.
On a system with a large number of printers,
this causes the clients to timeout (smbd
can take longer than 60 seconds to respond).
This patch fixes the problem by forwarding
the MSG_PRINTER_DRVUPGRADE to the background
lpq queue updater process and allowing it to
take care of the updating of the changeid
in the registry, allowing the smbd connected
to the client to return to processing requests
immediately.
https://bugzilla.samba.org/show_bug.cgi?id=9942
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Tue Feb 18 17:48:30 CET 2014 on sn-devel-104
(cherry picked from commit cd655715b8ee0a4e681d67b3996f71017b941401)
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/wscript | 3 +-
.../smbdotconf/printing/spoolssarchitecture.xml | 15 +++
lib/replace/wscript | 30 +++++--
libcli/smb/smb2cli_create.c | 10 ++-
libcli/smb/smbXcli_base.c | 62 +++++++++++++
libcli/smb/smbXcli_base.h | 6 ++
libcli/smb/smb_constants.h | 19 ++++
pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm | 14 +++
source3/build/charset.py | 6 ++
source3/include/client.h | 3 -
source3/include/ctdbd_conn.h | 2 +-
source3/include/smb.h | 19 ----
source3/lib/ctdbd_conn.c | 36 ++++++--
source3/libads/ldap.c | 11 ++-
source3/libsmb/async_smb.c | 22 -----
source3/libsmb/cliconnect.c | 25 ++++--
source3/libsmb/clidfs.c | 95 +++++++++++++++-----
source3/libsmb/clientgen.c | 26 +++++-
source3/libsmb/clitrans.c | 21 -----
source3/libsmb/libsmb_server.c | 14 ++-
source3/libsmb/libsmb_stat.c | 11 ++-
source3/locking/brlock.c | 34 +++++---
source3/modules/vfs_streams_depot.c | 10 +--
source3/printing/nt_printing.c | 29 ++++++-
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/smbd/globals.h | 1 +
source3/smbd/process.c | 72 ++++++++++++++-
source3/smbd/server_exit.c | 17 +++-
source3/smbd/smb2_server.c | 16 ++++
source3/winbindd/wb_lookupsids.c | 2 +-
source3/winbindd/winbindd_dual_srv.c | 8 ++-
source4/heimdal_build/config.h | 3 +-
source4/libcli/raw/smb.h | 14 ---
37 files changed, 568 insertions(+), 192 deletions(-)
create mode 100644 docs-xml/smbdotconf/printing/spoolssarchitecture.xml
Changeset truncated at 500 lines:
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 b6fb10b..8451689 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -363,10 +363,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')
@@ -385,18 +394,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/libcli/smb/smb2cli_create.c b/libcli/smb/smb2cli_create.c
index 3f8d672..9cb94b1 100644
--- a/libcli/smb/smb2cli_create.c
+++ b/libcli/smb/smb2cli_create.c
@@ -63,6 +63,8 @@ struct tevent_req *smb2cli_create_send(
uint8_t *dyn;
size_t dyn_len;
size_t max_dyn_len;
+ uint32_t additional_flags = 0;
+ uint32_t clear_flags = 0;
req = tevent_req_create(mem_ctx, &state,
struct smb2cli_create_state);
@@ -130,6 +132,12 @@ struct tevent_req *smb2cli_create_send(
data_blob_free(&blob);
}
+ if (smbXcli_conn_dfs_supported(conn) &&
+ smbXcli_tcon_is_dfs_share(tcon))
+ {
+ additional_flags |= SMB2_HDR_FLAG_DFS;
+ }
+
/*
* We use max_dyn_len = 0
* as we don't explicitly ask for any output length.
@@ -140,7 +148,7 @@ struct tevent_req *smb2cli_create_send(
max_dyn_len = 0;
subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_CREATE,
- 0, 0, /* flags */
+ additional_flags, clear_flags,
timeout_msec,
tcon,
session,
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index 14d4cc3..25fbabd 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -167,6 +167,9 @@ struct smbXcli_session {
};
struct smbXcli_tcon {
+ bool is_smb1;
+ uint32_t fs_attributes;
+
struct {
uint16_t tcon_id;
uint16_t optional_support;
@@ -1269,6 +1272,19 @@ struct tevent_req *smb1cli_req_create(TALLOC_CTX *mem_ctx,
if (tcon) {
tid = tcon->smb1.tcon_id;
+
+ if (tcon->fs_attributes & FILE_CASE_SENSITIVE_SEARCH) {
+ clear_flags |= FLAG_CASELESS_PATHNAMES;
+ } else {
+ /* Default setting, case insensitive. */
+ additional_flags |= FLAG_CASELESS_PATHNAMES;
+ }
+
+ if (smbXcli_conn_dfs_supported(conn) &&
+ smbXcli_tcon_is_dfs_share(tcon))
+ {
+ additional_flags2 |= FLAGS2_DFS_PATHNAMES;
+ }
}
state->smb1.recv_cmd = 0xFF;
@@ -2460,6 +2476,15 @@ bool smbXcli_conn_has_async_calls(struct smbXcli_conn *conn)
|| (talloc_array_length(conn->pending) != 0));
}
+bool smbXcli_conn_dfs_supported(struct smbXcli_conn *conn)
+{
+ if (conn->protocol >= PROTOCOL_SMB2_02) {
+ return (smb2cli_conn_server_capabilities(conn) & SMB2_CAP_DFS);
+ }
+
+ return (smb1cli_conn_capabilities(conn) & CAP_DFS);
+}
+
bool smb2cli_conn_req_possible(struct smbXcli_conn *conn, uint32_t *max_dyn_len)
{
uint16_t credits = 1;
@@ -5014,6 +5039,38 @@ struct smbXcli_tcon *smbXcli_tcon_create(TALLOC_CTX *mem_ctx)
return tcon;
}
+void smbXcli_tcon_set_fs_attributes(struct smbXcli_tcon *tcon,
+ uint32_t fs_attributes)
+{
+ tcon->fs_attributes = fs_attributes;
+}
+
+uint32_t smbXcli_tcon_get_fs_attributes(struct smbXcli_tcon *tcon)
+{
+ return tcon->fs_attributes;
+}
+
+bool smbXcli_tcon_is_dfs_share(struct smbXcli_tcon *tcon)
+{
+ if (tcon == NULL) {
+ return false;
+ }
+
+ if (tcon->is_smb1) {
+ if (tcon->smb1.optional_support & SMB_SHARE_IN_DFS) {
+ return true;
+ }
+
+ return false;
+ }
+
+ if (tcon->smb2.capabilities & SMB2_SHARE_CAP_DFS) {
+ return true;
+ }
+
+ return false;
+}
+
uint16_t smb1cli_tcon_current_id(struct smbXcli_tcon *tcon)
{
return tcon->smb1.tcon_id;
@@ -5021,6 +5078,7 @@ uint16_t smb1cli_tcon_current_id(struct smbXcli_tcon *tcon)
void smb1cli_tcon_set_id(struct smbXcli_tcon *tcon, uint16_t tcon_id)
{
+ tcon->is_smb1 = true;
tcon->smb1.tcon_id = tcon_id;
}
@@ -5032,6 +5090,8 @@ bool smb1cli_tcon_set_values(struct smbXcli_tcon *tcon,
const char *service,
const char *fs_type)
{
+ tcon->is_smb1 = true;
+ tcon->fs_attributes = 0;
tcon->smb1.tcon_id = tcon_id;
tcon->smb1.optional_support = optional_support;
tcon->smb1.maximal_access = maximal_access;
@@ -5070,6 +5130,8 @@ void smb2cli_tcon_set_values(struct smbXcli_tcon *tcon,
uint32_t capabilities,
uint32_t maximal_access)
{
+ tcon->is_smb1 = false;
+ tcon->fs_attributes = 0;
tcon->smb2.tcon_id = tcon_id;
tcon->smb2.type = type;
tcon->smb2.flags = flags;
diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h
index 3d93427..5fe4018 100644
--- a/libcli/smb/smbXcli_base.h
+++ b/libcli/smb/smbXcli_base.h
@@ -43,6 +43,8 @@ void smbXcli_conn_disconnect(struct smbXcli_conn *conn, NTSTATUS status);
bool smbXcli_conn_has_async_calls(struct smbXcli_conn *conn);
+bool smbXcli_conn_dfs_supported(struct smbXcli_conn *conn);
+
enum protocol_types smbXcli_conn_protocol(struct smbXcli_conn *conn);
bool smbXcli_conn_use_unicode(struct smbXcli_conn *conn);
@@ -297,6 +299,10 @@ NTSTATUS smb2cli_session_set_channel_key(struct smbXcli_session *session,
NTSTATUS smb2cli_session_encryption_on(struct smbXcli_session *session);
struct smbXcli_tcon *smbXcli_tcon_create(TALLOC_CTX *mem_ctx);
+void smbXcli_tcon_set_fs_attributes(struct smbXcli_tcon *tcon,
+ uint32_t fs_attributes);
+uint32_t smbXcli_tcon_get_fs_attributes(struct smbXcli_tcon *tcon);
+bool smbXcli_tcon_is_dfs_share(struct smbXcli_tcon *tcon);
uint16_t smb1cli_tcon_current_id(struct smbXcli_tcon *tcon);
void smb1cli_tcon_set_id(struct smbXcli_tcon *tcon, uint16_t tcon_id);
bool smb1cli_tcon_set_values(struct smbXcli_tcon *tcon,
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index 6dd7b28..8a3ef72 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -363,6 +363,25 @@ enum csc_policy {
#define OPLOCK_BREAK_TO_NONE 0
#define OPLOCK_BREAK_TO_LEVEL_II 1
+/* Filesystem Attributes. */
+#define FILE_CASE_SENSITIVE_SEARCH 0x00000001
+#define FILE_CASE_PRESERVED_NAMES 0x00000002
+#define FILE_UNICODE_ON_DISK 0x00000004
+/* According to cifs9f, this is 4, not 8 */
+/* Acconding to testing, this actually sets the security attribute! */
+#define FILE_PERSISTENT_ACLS 0x00000008
+#define FILE_FILE_COMPRESSION 0x00000010
+#define FILE_VOLUME_QUOTAS 0x00000020
+#define FILE_SUPPORTS_SPARSE_FILES 0x00000040
+#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
+#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
+#define FS_LFN_APIS 0x00004000
+#define FILE_VOLUME_IS_COMPRESSED 0x00008000
+#define FILE_SUPPORTS_OBJECT_IDS 0x00010000
+#define FILE_SUPPORTS_ENCRYPTION 0x00020000
+#define FILE_NAMED_STREAMS 0x00040000
+#define FILE_READ_ONLY_VOLUME 0x00080000
+
/* ioctl codes */
#define IOCTL_QUERY_JOB_INFO 0x530060
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/source3/build/charset.py b/source3/build/charset.py
index 44852a6..0033557 100644
--- a/source3/build/charset.py
+++ b/source3/build/charset.py
@@ -33,6 +33,12 @@ def CHECK_SAMBA3_CHARSET(conf, crossbuild=False):
default_unix_charset="UTF-8"
# TODO: this used to warn about the set charset on cross builds
+ if default_dos_charset is False or default_unix_charset is False:
+ # we found iconv, but it failed to convert anything (e.g. on AIX)
+ conf.undefine('HAVE_NATIVE_ICONV');
+ default_dos_charset = "ASCII"
+ default_unix_charset = "UTF-8"
+
conf.DEFINE('DEFAULT_DOS_CHARSET', default_dos_charset, quote=True)
conf.DEFINE('DEFAULT_UNIX_CHARSET', default_unix_charset, quote=True)
diff --git a/source3/include/client.h b/source3/include/client.h
index 09f9660..6c20843 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -77,7 +77,6 @@ struct cli_state {
uint32_t server_posix_capabilities;
/* What the client requested. */
uint32_t requested_posix_capabilities;
- bool dfsroot;
bool backup_intent;
/* The list of pipes currently open on this connection. */
@@ -91,8 +90,6 @@ struct cli_state {
bool use_oplocks; /* should we use oplocks? */
- bool case_sensitive; /* False by default. */
-
/* Where (if anywhere) this is mounted under DFS. */
char *dfs_mountpoint;
diff --git a/source3/include/ctdbd_conn.h b/source3/include/ctdbd_conn.h
index 64cb1d5..bba63f8 100644
--- a/source3/include/ctdbd_conn.h
+++ b/source3/include/ctdbd_conn.h
@@ -76,7 +76,7 @@ NTSTATUS ctdbd_traverse(uint32_t db_id,
NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn,
const struct sockaddr_storage *server,
const struct sockaddr_storage *client,
- void (*release_ip_handler)(const char *ip_addr,
+ bool (*release_ip_handler)(const char *ip_addr,
void *private_data),
void *private_data);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index e1ab344..64ea568 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -513,25 +513,6 @@ Offset Data length.
#define RENAME_FLAG_RENAME 0x104
#define RENAME_FLAG_COPY 0x105
-/* Filesystem Attributes. */
-#define FILE_CASE_SENSITIVE_SEARCH 0x00000001
-#define FILE_CASE_PRESERVED_NAMES 0x00000002
-#define FILE_UNICODE_ON_DISK 0x00000004
-/* According to cifs9f, this is 4, not 8 */
-/* Acconding to testing, this actually sets the security attribute! */
-#define FILE_PERSISTENT_ACLS 0x00000008
-#define FILE_FILE_COMPRESSION 0x00000010
-#define FILE_VOLUME_QUOTAS 0x00000020
-#define FILE_SUPPORTS_SPARSE_FILES 0x00000040
-#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
-#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
-#define FS_LFN_APIS 0x00004000
-#define FILE_VOLUME_IS_COMPRESSED 0x00008000
-#define FILE_SUPPORTS_OBJECT_IDS 0x00010000
-#define FILE_SUPPORTS_ENCRYPTION 0x00020000
-#define FILE_NAMED_STREAMS 0x00040000
-#define FILE_READ_ONLY_VOLUME 0x00080000
-
/* ChangeNotify flags. */
#define FILE_NOTIFY_CHANGE_FILE_NAME 0x001
#define FILE_NOTIFY_CHANGE_DIR_NAME 0x002
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 630b22e..1c70b3b 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -59,7 +59,7 @@ struct ctdbd_connection {
struct ctdb_packet_context *pkt;
struct tevent_fd *fde;
- void (*release_ip_handler)(const char *ip_addr, void *private_data);
+ bool (*release_ip_handler)(const char *ip_addr, void *private_data);
void *release_ip_priv;
};
@@ -427,10 +427,23 @@ static NTSTATUS ctdb_read_req(struct ctdbd_connection *conn, uint32_t reqid,
if ((conn->release_ip_handler != NULL)
&& (msg->srvid == CTDB_SRVID_RELEASE_IP)) {
+ bool ret;
+
/* must be dispatched immediately */
DEBUG(10, ("received CTDB_SRVID_RELEASE_IP\n"));
- conn->release_ip_handler((const char *)msg->data,
- conn->release_ip_priv);
+ ret = conn->release_ip_handler((const char *)msg->data,
+ conn->release_ip_priv);
+ if (ret) {
+ /*
+ * We need to release the ip,
+ * so return an error to the upper layers.
+ *
+ * We make sure we don't trigger this again.
+ */
+ conn->release_ip_handler = NULL;
+ conn->release_ip_priv = NULL;
+ return NT_STATUS_ADDRESS_CLOSED;
+ }
TALLOC_FREE(hdr);
goto next_pkt;
}
@@ -629,10 +642,21 @@ static NTSTATUS ctdb_handle_message(uint8_t *buf, size_t length,
if ((conn->release_ip_handler != NULL)
&& (msg->srvid == CTDB_SRVID_RELEASE_IP)) {
+ bool ret;
+
/* must be dispatched immediately */
DEBUG(10, ("received CTDB_SRVID_RELEASE_IP\n"));
- conn->release_ip_handler((const char *)msg->data,
- conn->release_ip_priv);
+ ret = conn->release_ip_handler((const char *)msg->data,
+ conn->release_ip_priv);
+ if (ret) {
+ /*
+ * We need to release the ip.
+ *
+ * We make sure we don't trigger this again.
+ */
+ conn->release_ip_handler = NULL;
+ conn->release_ip_priv = NULL;
+ }
TALLOC_FREE(buf);
return NT_STATUS_OK;
}
@@ -1691,7 +1715,7 @@ static void smbd_ctdb_canonicalize_ip(const struct sockaddr_storage *in,
NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn,
const struct sockaddr_storage *_server,
const struct sockaddr_storage *_client,
- void (*release_ip_handler)(const char *ip_addr,
+ bool (*release_ip_handler)(const char *ip_addr,
void *private_data),
void *private_data)
{
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index c8ef5b5..fb99132 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1143,13 +1143,16 @@ static ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path,
#ifdef HAVE_LDAP_ADD_RESULT_ENTRY
while (cookie) {
LDAPMessage *res2 = NULL;
- ADS_STATUS status2;
LDAPMessage *msg, *next;
- status2 = ads_do_paged_search_args(ads, bind_path, scope, expr,
+ status = ads_do_paged_search_args(ads, bind_path, scope, expr,
attrs, args, &res2, &count, &cookie);
-
- if (!ADS_ERR_OK(status2)) break;
+ if (!ADS_ERR_OK(status)) {
+ /* Ensure we free all collected results */
+ ads_msgfree(ads, *res);
+ *res = NULL;
+ break;
+ }
/* this relies on the way that ldap_add_result_entry() works internally. I hope
that this works on all ldap libs, but I have only tested with openldap */
--
Samba Shared Repository
More information about the samba-cvs
mailing list