summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* s4:libcli/smb2: initialize ls->lease_versionStefan Metzmacher2014-11-271-0/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/smb2: add new_epoch to struct smb2_lease_breakStefan Metzmacher2014-11-272-0/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:param: don't expand PROTOCOL_DEFAULT in lpcfg_smbcli_options()Stefan Metzmacher2014-11-271-1/+1
| | | | | | | We let the low-level smb1 or smb2 code assign what PROTOCOL_DEFAULT means. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/smb2: allow the caller to specify a specific value for max_protocol.Stefan Metzmacher2014-11-272-1/+10
| | | | | | | | The default is still PROTOCOL_LATEST. As smb2_connect*() is about SMB2/3 only we upgrade to PROTOCOL_LATEST if PROTOCOL_NT1 or lower is given. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/raw: fix up the max_protocol value for the current transport ↵Stefan Metzmacher2014-11-271-0/+8
| | | | | | | | | | | | | connection This allows the caller to pass PROTOCOL_DEFAULT, which results in PROTOCOL_NT1. As smbcli_transport_init() is about SMB1 only we downgrade to PROTOCOL_NT1 if a higher value (for SMB2 or SMB3) was given. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/smb_composite: use the options on the transportStefan Metzmacher2014-11-271-1/+1
| | | | | | | | These are the options which really belong to the connection and might not be the the same as the hints given from the caller. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_create: send interim responses after 0.5 millisecondsStefan Metzmacher2014-11-271-7/+1
| | | | | | | | | | | | | | | | We don't have to care about delayed NT_STATUS_SHARING_VIOLATION anymore after the following commit: commit 4111fcfd4f570d39d46a0d414546ca62c7b609be Author: Jeremy Allison <jra@samba.org> Date: Thu May 2 11:12:47 2013 -0700 Only do the 1 second delay for sharing violations for SMB1, not SMB2. Match Windows behavior. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Revert "libcli/smb: mask off SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET for version 1"Stefan Metzmacher2014-11-271-1/+0
| | | | | | | | | This reverts commit a6affb7bb3ff595165e708c56ede2181f0bb570f. This is not really needed. The caller should ignore this flag. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* gse_krb5: Avoid a segfault when we can not read the dedicated keytab fileAndrew Bartlett2014-11-272-33/+9
| | | | | | | | | | | | | | | This improved code simply cleans up the memory as soon as possible, rather than using memcmp(). Otherwise, we segfault if krb5_kt_start_seq_get fails, as it can set the fd element in the handle to -1. Change-Id: Ib4821ef944a7e12cd8a891ae07dbfc0567c65495 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Nov 27 07:38:02 CET 2014 on sn-devel-104
* lib/param: Allow enum values to also be white-space insentive in comparisonAndrew Bartlett2014-11-271-1/+1
| | | | | | | | | This makes it easier to specify these in the --option= syntax on the command line. Change-Id: I6b2398d79d37407c5d82cd6b540651ede1d09106 Pair-Programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* wbinfo: create a more comprehensive test for sids2xidsGarming Sam2014-11-272-15/+73
| | | | | | | | | | | In particular, this tests that ID_TYPE_BOTH is cached correctly. Change-Id: I2475f22d3f4506c93b15d82b0d337d3729bbbd4c Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Thu Nov 27 05:16:53 CET 2014 on sn-devel-104
* wbinfo: fix tests and lack of cache flushingGarming Sam2014-11-271-2/+2
| | | | | | Change-Id: I1a0a8f62522a6eb64d39bee48f4f71403d7c343a Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* param: Simplify get_parametric_helper()Volker Lendecke2014-11-271-15/+4
| | | | | | | | | | With variable sized arrays we don't need talloc_asprintf here Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Nov 27 01:41:09 CET 2014 on sn-devel-104
* registry3: Fix a typoVolker Lendecke2014-11-261-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: remove unused get_share_params()David Disseldorp2014-11-262-24/+0
| | | | | | | | | | | Given a share name, get_share_params() returns corresponding snum inside a struct share_params. find_service() provides duplicate functionality. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Nov 26 21:27:21 CET 2014 on sn-devel-104
* srv_srvsvc_nt: remove unneeded get_share_params() callDavid Disseldorp2014-11-261-8/+3
| | | | | | | | The snum and share name are already determined via the prior find_service() call. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libcli: SMB2: Pure SMB2-only negprot fix to make us behave as a Windows ↵Jeremy Allison2014-11-262-0/+11
| | | | | | | | | | client does. Required as some servers return zero when asked for zero credits in an initial SMB2-only negprot. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <rb@sernet.de>
* gencache: Request mutexes for gencache_notrans.tdbChristof Schmitt2014-11-261-1/+2
| | | | | | | | | | | The check in tdb_wrap ensures that mutexes are only used on systems that properly support them. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Nov 26 19:04:11 CET 2014 on sn-devel-104
* gencache: Convert gencache.tdb to tdb_wrapChristof Schmitt2014-11-261-30/+31
| | | | | | | | This change is not strictly necessary, but for consistency both gencache tdbs are now opened through tdb_wrap. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* gencache: Convert gencache_notrans to use tdb_wrapChristof Schmitt2014-11-261-25/+28
| | | | | | | This allows using on the mutex check in tdb_wrap. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:gencache: don't use transaction non non-persistent gencache_notrans.tdbMichael Adam2014-11-261-8/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gencache_notrans.tdb is a non-persistent cache layer above the persistent gencache.tdb. Despite its name, and despite the nature of non-persistent tdbs, the current stabilization code uses a transaction on gencache_notrans.tdb like this: transaction_start(cache) transaction_start(cache_notrans) traverse(cache_notrans, stabilize_fn) transaction_commit(cache) transaction_commit(cache_notrans) where stabilze_fn does this on a record: 1. store it to or delete it from cache (depending on the timeout) 2. delete it from the cache_notrans This patch changes gencache_notrans.tdb to avoid transactions by using an all-record lock like this: tdb_allrecord_lock(cache_notrans) transaction_start(cache) traverse(cache_notrans, stabilize_fn_mod) transaction_commit(cache) traverse(cache_notrans, wipe_fn) tdb_wipe_all(cache_notrans) tdb_allrecord_unlock(cache_notrans) with stabilize_fn_mod doing only: 1. store the record to or delete it from cache (depending on the timeout) and wipe_fn deleting the records from the gencache_notrans db. This is a step towards making non-persistent-db specific features like mutex locking usable for gencache_notrans.tdb. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:gencache: simply stabilize() a bit more: remove error from stateMichael Adam2014-11-261-5/+1
| | | | | | | | | | | state.error is set to true if and only if the traverse callback returns error (-1), and hence only if the traverse fails. Hence the the error state is redundant. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:gencache: fix logic in stabilization when deleting a record from stable cacheMichael Adam2014-11-261-3/+3
| | | | | | | | | | | | | Set state->written = true in the delete case if and only if the record has really been deleted. This does currently not seem to lead to an unneeded write to the DB, since failure to delete the record will cause the traverse and hence the transaction to cancel. But I think this is clearer. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* tdb: Fix tdb_runtime_check_for_robust_mutexes()Volker Lendecke2014-11-261-4/+4
| | | | | | | | | | When using exit() instead of _exit(), the child will flush buffered stdout (and other stdio) content that it inherited from the parent process. In make test, this led to duplicate output from net registry which then confused the blackbox selftest. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib: Use tdb_parse_record in gencache_setVolker Lendecke2014-11-261-7/+15
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Nov 26 14:50:38 CET 2014 on sn-devel-104
* dns_server: Only build common library if AD DC is enabled.Andreas Schneider2014-11-261-1/+1
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Nov 26 12:11:18 CET 2014 on sn-devel-104
* dfs_server: Only build in case we build an AD DC too.Andreas Schneider2014-11-261-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-rpc: dnsserver: Fix enumeration of IPv4 and IPv6 addressesGuenter Kukkukk2014-11-264-38/+151
| | | | | | | | | | | | | In the initial implementation only IPv4 addresses were supported. Add IPv6 (and mixed IPv4/IPv6) support and all further needed conversion routines to support w2k, dotnet, longhorn clients. Signed-off-by: Guenter Kukkukk <linux@kukkukk.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Wed Nov 26 03:44:07 CET 2014 on sn-devel-104
* samba-tool: Fix the IP output of "samba-tool dns serverinfo <some_server>"Guenter Kukkukk2014-11-261-5/+8
| | | | | | | | | | | | | Avoid hardcoded IP-strings, use standard python IP functions to format IPv4 and IPv6 addresses correctly. I have removed the display of the port number. MS-DNSP 2.2.3.2.2.1 DNS_ADDR: (from May 15, 2014) Port Number (2bytes): Senders MUST set this to zero, and receivers MUST ignore it. Signed-off-by: Guenter Kukkukk <linux@kukkukk.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* samba-tool: Fix enum values in dns.pyGuenter Kukkukk2014-11-261-1/+1
| | | | | | | DNS_ZONE_UPDATE_SECURE was used twice, DNS_ZONE_UPDATE_UNSECURE was missing. Signed-off-by: Guenter Kukkukk <linux@kukkukk.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* lib: Fix header include protection #defineVolker Lendecke2014-11-251-2/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Nov 25 15:38:22 CET 2014 on sn-devel-104
* script/autobuild.py: build 'samba' using --picky-developerStefan Metzmacher2014-11-251-1/+1
| | | | | | | | | | This makes sure we don't get unexpected new compiler warnings. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Nov 25 09:46:30 CET 2014 on sn-devel-104
* wafsamba: change the default to allow_warnings=False for CURRENT_CFLAGS()Stefan Metzmacher2014-11-251-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wafsamba: change the default to allow_warnings=False for ↵Stefan Metzmacher2014-11-251-3/+3
| | | | | | | SAMBA_{SUBSYSTEM,LIBRARY,MODULE}() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:ntvfs/unixuid: remove unused allow_warnings=TrueStefan Metzmacher2014-11-251-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:librpc: remove unused allow_warnings=True for 'dcerpc'Stefan Metzmacher2014-11-251-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:lib/messaging: remove unused allow_warnings=TrueStefan Metzmacher2014-11-251-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:lib/events: remove unused allow_warnings=TrueStefan Metzmacher2014-11-251-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* wafsamba: use -Wno-error=deprecated-declarations in picky-developer modeStefan Metzmacher2014-11-251-1/+1
| | | | | | | | | Currently we use too many deprecated function like dcerpc_binding_handle_set_sync_ev() and others, but this should not be a reason to require 'allow_warnings=True'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture: remove unused allow_warnings=True for 'TORTURE_BASIC' and ↵Stefan Metzmacher2014-11-251-2/+0
| | | | | | | 'TORTURE_VFS' Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/winbind: remove unused variables in struct_based.cStefan Metzmacher2014-11-251-4/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/locktest: comment out unused code and avoid smbcli_nt_error()Stefan Metzmacher2014-11-251-5/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:smb_server/smb2: remove unused _pad variablesStefan Metzmacher2014-11-253-12/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:smb_server/smb2: avoid unused warnings in smb2srv_setinfo_send()Stefan Metzmacher2014-11-251-1/+1
| | | | | | | op->req and req have the same value. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:ntvfs/smb2: ifdef out unused codeStefan Metzmacher2014-11-251-0/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:ntvfs: explicitly handle RAW_FILEINFO_UNIX_{BASIC,LINK} in ↵Stefan Metzmacher2014-11-251-2/+7
| | | | | | | | | ntvfs_map_fileinfo() This avoids compiler warnings. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:nbt_server: avoid str_list related const warningStefan Metzmacher2014-11-251-1/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:kdc: remove unused allow_warnings=True for 'MIT_SAMBA'Stefan Metzmacher2014-11-251-1/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:kdc: comment out unused code in db-glue.cStefan Metzmacher2014-11-251-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/raw: use smb_setfsinfo_level in smb_setfsinfoStefan Metzmacher2014-11-251-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>