Stefan Metzmacher [Tue, 11 Nov 2014 18:35:07 +0000 (19:35 +0100)]
s4:torture/smb2: always verify the v2 lease epoch.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 12 Nov 2014 16:00:44 +0000 (17:00 +0100)]
s4:torture/smb2: verify lease_flags in CHECK_LEASE_BREAK()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 12 Nov 2014 06:24:16 +0000 (07:24 +0100)]
s4:torture/smb2: lease per test fnames
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 12 Nov 2014 06:23:31 +0000 (07:23 +0100)]
s4:torture/smb2: make lease tests more reliable by calling torture_wait_for_lease_break()
They now work against w2k8r2, w2012, w2012r2.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 12 Nov 2014 06:19:49 +0000 (07:19 +0100)]
s4:torture/smb2: skip lease tests if the server doesn't support them
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 12 Nov 2014 10:13:15 +0000 (11:13 +0100)]
s4:libcli/smb2: initialize ls->lease_version
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Tue, 11 Nov 2014 18:33:13 +0000 (19:33 +0100)]
s4:libcli/smb2: add new_epoch to struct smb2_lease_break
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 20 Nov 2014 13:38:09 +0000 (14:38 +0100)]
s4:param: don't expand PROTOCOL_DEFAULT in lpcfg_smbcli_options()
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>
Stefan Metzmacher [Thu, 20 Nov 2014 13:35:38 +0000 (14:35 +0100)]
s4:libcli/smb2: allow the caller to specify a specific value for max_protocol.
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>
Stefan Metzmacher [Thu, 20 Nov 2014 13:32:40 +0000 (14:32 +0100)]
s4:libcli/raw: fix up the max_protocol value for the current transport 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>
Stefan Metzmacher [Thu, 20 Nov 2014 13:30:31 +0000 (14:30 +0100)]
s4:libcli/smb_composite: use the options on the transport
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>
Stefan Metzmacher [Thu, 13 Nov 2014 11:10:46 +0000 (12:10 +0100)]
s3:smb2_create: send interim responses after 0.5 milliseconds
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>
Stefan Metzmacher [Wed, 26 Nov 2014 10:06:16 +0000 (11:06 +0100)]
Revert "libcli/smb: mask off SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET for version 1"
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>
Andrew Bartlett [Thu, 27 Nov 2014 04:13:23 +0000 (17:13 +1300)]
gse_krb5: Avoid a segfault when we can not read the dedicated keytab file
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
Andrew Bartlett [Thu, 27 Nov 2014 04:08:30 +0000 (17:08 +1300)]
lib/param: Allow enum values to also be white-space insentive in comparison
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>
Garming Sam [Tue, 25 Nov 2014 03:52:53 +0000 (16:52 +1300)]
wbinfo: create a more comprehensive test for sids2xids
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
Garming Sam [Tue, 25 Nov 2014 02:59:27 +0000 (15:59 +1300)]
wbinfo: fix tests and lack of cache flushing
Change-Id: I1a0a8f62522a6eb64d39bee48f4f71403d7c343a
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Volker Lendecke [Wed, 26 Nov 2014 20:35:27 +0000 (21:35 +0100)]
param: Simplify get_parametric_helper()
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
Volker Lendecke [Wed, 26 Nov 2014 20:34:44 +0000 (21:34 +0100)]
registry3: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
David Disseldorp [Tue, 25 Nov 2014 21:22:24 +0000 (22:22 +0100)]
param: remove unused get_share_params()
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
David Disseldorp [Tue, 25 Nov 2014 21:22:23 +0000 (22:22 +0100)]
srv_srvsvc_nt: remove unneeded get_share_params() call
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>
Jeremy Allison [Wed, 26 Nov 2014 01:43:25 +0000 (17:43 -0800)]
libcli: SMB2: Pure SMB2-only negprot fix to make us behave as a Windows 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>
Christof Schmitt [Mon, 17 Nov 2014 21:59:34 +0000 (14:59 -0700)]
gencache: Request mutexes for gencache_notrans.tdb
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
Christof Schmitt [Mon, 17 Nov 2014 22:44:47 +0000 (15:44 -0700)]
gencache: Convert gencache.tdb to tdb_wrap
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>
Christof Schmitt [Mon, 17 Nov 2014 21:30:49 +0000 (14:30 -0700)]
gencache: Convert gencache_notrans to use tdb_wrap
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>
Michael Adam [Wed, 2 Jul 2014 05:44:04 +0000 (07:44 +0200)]
s3:gencache: don't use transaction non non-persistent gencache_notrans.tdb
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>
Michael Adam [Thu, 26 Jun 2014 14:56:41 +0000 (16:56 +0200)]
s3:gencache: simply stabilize() a bit more: remove error from state
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>
Michael Adam [Thu, 26 Jun 2014 14:37:17 +0000 (16:37 +0200)]
s3:gencache: fix logic in stabilization when deleting a record from stable cache
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>
Volker Lendecke [Wed, 26 Nov 2014 15:35:19 +0000 (15:35 +0000)]
tdb: Fix tdb_runtime_check_for_robust_mutexes()
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>
Volker Lendecke [Tue, 25 Nov 2014 21:03:18 +0000 (21:03 +0000)]
lib: Use tdb_parse_record in gencache_set
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
Andreas Schneider [Wed, 19 Nov 2014 09:31:45 +0000 (10:31 +0100)]
dns_server: Only build common library if AD DC is enabled.
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
Andreas Schneider [Wed, 19 Nov 2014 09:30:23 +0000 (10:30 +0100)]
dfs_server: Only build in case we build an AD DC too.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Guenter Kukkukk [Fri, 21 Nov 2014 15:57:45 +0000 (16:57 +0100)]
s4-rpc: dnsserver: Fix enumeration of IPv4 and IPv6 addresses
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
Guenter Kukkukk [Fri, 21 Nov 2014 02:55:25 +0000 (03:55 +0100)]
samba-tool: Fix the IP output of "samba-tool dns serverinfo <some_server>"
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>
Guenter Kukkukk [Fri, 21 Nov 2014 02:40:17 +0000 (03:40 +0100)]
samba-tool: Fix enum values in dns.py
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>
Volker Lendecke [Tue, 25 Nov 2014 11:55:26 +0000 (12:55 +0100)]
lib: Fix header include protection #define
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
Stefan Metzmacher [Tue, 11 Nov 2014 13:54:41 +0000 (14:54 +0100)]
script/autobuild.py: build 'samba' using --picky-developer
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
Stefan Metzmacher [Wed, 26 Feb 2014 06:34:51 +0000 (07:34 +0100)]
wafsamba: change the default to allow_warnings=False for CURRENT_CFLAGS()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 06:34:51 +0000 (07:34 +0100)]
wafsamba: change the default to allow_warnings=False for SAMBA_{SUBSYSTEM,LIBRARY,MODULE}()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:27:28 +0000 (12:27 +0100)]
s4:ntvfs/unixuid: remove unused allow_warnings=True
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:27:28 +0000 (12:27 +0100)]
s4:librpc: remove unused allow_warnings=True for 'dcerpc'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:27:28 +0000 (12:27 +0100)]
s4:lib/messaging: remove unused allow_warnings=True
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:27:28 +0000 (12:27 +0100)]
s4:lib/events: remove unused allow_warnings=True
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 22 May 2014 08:41:33 +0000 (10:41 +0200)]
wafsamba: use -Wno-error=deprecated-declarations in picky-developer mode
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>
Stefan Metzmacher [Wed, 29 Oct 2014 11:26:38 +0000 (12:26 +0100)]
s4:torture: remove unused allow_warnings=True for 'TORTURE_BASIC' and 'TORTURE_VFS'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 10:39:39 +0000 (11:39 +0100)]
s4:torture/winbind: remove unused variables in struct_based.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 27 Feb 2014 08:08:17 +0000 (09:08 +0100)]
s4:torture/locktest: comment out unused code and avoid smbcli_nt_error()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 27 Feb 2014 08:08:17 +0000 (09:08 +0100)]
s4:smb_server/smb2: remove unused _pad variables
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 27 Feb 2014 08:08:17 +0000 (09:08 +0100)]
s4:smb_server/smb2: avoid unused warnings in smb2srv_setinfo_send()
op->req and req have the same value.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:ntvfs/smb2: ifdef out unused code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:ntvfs: explicitly handle RAW_FILEINFO_UNIX_{BASIC,LINK} in ntvfs_map_fileinfo()
This avoids compiler warnings.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:nbt_server: avoid str_list related const warning
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:21:07 +0000 (12:21 +0100)]
s4:kdc: remove unused allow_warnings=True for 'MIT_SAMBA'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:kdc: comment out unused code in db-glue.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 27 Feb 2014 08:50:57 +0000 (09:50 +0100)]
s4:libcli/raw: use smb_setfsinfo_level in smb_setfsinfo
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:25:24 +0000 (12:25 +0100)]
s4:lib/registry: remove unused allow_warnings=True
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:24:44 +0000 (12:24 +0100)]
s4:lib/registry: fix compiler warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 27 Feb 2014 08:49:47 +0000 (09:49 +0100)]
s4:lib/registry: avoid some const warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:21:07 +0000 (12:21 +0100)]
s3:wscript_build: remove unused allow_warnings=True for 'KRBCLIENT'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:winbindd: make use of talloc_string_sub2() in generate_krb5_ccache()
This way we don't pass a given format string to talloc_asprintf().
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:winbindd: avoid invalid pointer type warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 13 Nov 2014 08:12:56 +0000 (09:12 +0100)]
s3:utils: rename variables in regedit_*.c to fix shadow warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:utils: add debug functions instead of magic format strings in net_idmap_check.c
This way the compiler can check the format string and doesn't generate warnings.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 23 Oct 2014 08:18:21 +0000 (10:18 +0200)]
s3:torture: avoid nesting of macros and function calls in torture_cli_session_setup2()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:smbd: avoid a compiler warning in open_sockets_smbd()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:smbd: do casting of dm_sessid_t in steps
This makes it more explicit and avoids compiler warnings.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:18:14 +0000 (12:18 +0100)]
s3:wscript_build: remove unused allow_warnings=True for 'smbregistry'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:registry: use discard_const_p() to avoid const warning in smb_iconv() define
I'm wondering why we have this in reg_parse_internal.h at all!
But for now just fix warnings...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 3 Jul 2014 11:14:20 +0000 (13:14 +0200)]
s3:printing: fix some const warnings in print_iprint.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Kai Blin [Fri, 14 Mar 2014 08:07:16 +0000 (09:07 +0100)]
s3:printing: Avoid compiler warning about unused label
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:passdb: avoid invalid pointer type warnings in pdb_wbc_sam.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:passdb: always copy the history in pdb_set_plaintext_passwd()
We should not write to memory marked as const
(returned from pdb_get_pw_history())!
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:13:23 +0000 (12:13 +0100)]
s3:wscript_build: remove unused allow_warnings=True for 'param'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:12:48 +0000 (12:12 +0100)]
s3:param: fix compiler warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:11:33 +0000 (12:11 +0100)]
s3:modules: remove unused allow_warnings=True for non_posix_acls, and vfs_media_harmony
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 13 Nov 2014 08:12:56 +0000 (09:12 +0100)]
s3:modules: rename variables in vfs_fruit.c to fix shadow warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:04:36 +0000 (12:04 +0100)]
s3:librpc/idl: mark struct smbXsrv_client as [public]
This avoids compiler warnings about unused code.
We don't use the NDR code for this yet, will be done
when we get multi-channel support.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 29 Oct 2014 11:21:07 +0000 (12:21 +0100)]
s3:wscript_build: remove unused allow_warnings=True for 'ads'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:libads: avoid some compiler warnings in ldap.c
We use helper variables and explicit casts using
discard_const_p() to avoid bogus const warnings.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 23 Oct 2014 08:17:40 +0000 (10:17 +0200)]
s3:libsmb: remove unused variables in cliconnect.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:lib/netapi/examples: fix pointer from integer error in nltest.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:lib/netapi/tests: fix invalid switch enum level warning
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 13 Nov 2014 07:50:35 +0000 (08:50 +0100)]
s3:lib: fix/simplify srprs_hex()
There're a few problems with this function.
- it pretends to support values up to UINT64_MAX
in it only returns 'unsigned' which support only
values up to UINT32_MAX. Currently we only have
callers with len=2 and len=8, so it's not a triggered
bug.
We just allow (len >= 1 && len <= 8) now.
- The compiler is not able to inspect the format string
to sscanf().
We copy up to 8 bytes into a stack buffer
and always pass "%8x" to sscanf.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Kamen Mazdrashki [Thu, 20 Nov 2014 03:07:47 +0000 (04:07 +0100)]
lib-pyldb: Block elements should be surrounded by {} in py_msg.setitem()
Change-Id: I0d09374b27708fcaad3523d985a2db7983dbd81a
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Nov 25 07:24:12 CET 2014 on sn-devel-104
Kamen Mazdrashki [Thu, 20 Nov 2014 03:06:01 +0000 (04:06 +0100)]
lib-pyldb: Fix docstring for msg.add() method - it was "S.append()"
Change-Id: I9492d3c3993fc3d68d7bf24405db6e8cd746eaac
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Kamen Mazdrashki [Tue, 25 Nov 2014 02:50:52 +0000 (03:50 +0100)]
lib-ldb-test: Test copying message element from a message to a new message
Change-Id: Iefcafb418a170ee410aec900bb36eb8e01e946b1
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Kamen Mazdrashki [Wed, 12 Nov 2014 00:17:56 +0000 (01:17 +0100)]
lib-pyldb: Avoid crash when copying MessageElements between Python Message objects
This patch allows for following snipets in Python:
res = ldb.search(...)
m_from = res[0]
m_to = Message()
m_to.add(m_from["attrName"])
The problem previously is that we are trying to reference a
ldb_message_element that may not be a memory context on its own.
For instance, when search request from above example returns
Messages with more than one attribute, this leads immediately
to "Bad talloc magic value" crash, every message element beside
the first one is not a memory context
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Kamen Mazdrashki [Wed, 12 Nov 2014 00:12:31 +0000 (01:12 +0100)]
lib-ldb_ldif: Stop processing if ldb_message element name is NULL
I have hit this while using Python bindings for testing and
forgot to pass 'name' argument to MessageElement constructor
Passing NULL as 'name' is obviously a mistake and this commits
aims to warn about such unintetional mistakes.
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Kamen Mazdrashki [Tue, 11 Nov 2014 01:56:32 +0000 (02:56 +0100)]
lib-ldb: Check for input parameter when searching attributes by name
This prevents a segfault that is hard to be tracked down from
Python bindings for instance.
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Kamen Mazdrashki [Mon, 10 Nov 2014 21:59:07 +0000 (22:59 +0100)]
lib-pyldb: Throw exception when we can't create MessageElement object
At the moment we return an error, but no exception and it is
hard to instantly see what the problem is from Python
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Kamen Mazdrashki [Sun, 9 Nov 2014 03:31:36 +0000 (04:31 +0100)]
lib-pyldb: Avoid leaking memory in error cases
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Kamen Mazdrashki [Sun, 9 Nov 2014 03:28:47 +0000 (04:28 +0100)]
lib-pyldb: Avoid SEGFAULT in case we can't convert passed value to py_String
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Mon, 24 Nov 2014 16:46:27 +0000 (17:46 +0100)]
s3-smbstatus: Fix exit code of profile output.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10961
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 24 21:13:51 CET 2014 on sn-devel-104
Volker Lendecke [Mon, 24 Nov 2014 15:31:07 +0000 (16:31 +0100)]
messaging3: Fix sending large messages on FreeBSD
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Mon, 24 Nov 2014 15:27:39 +0000 (16:27 +0100)]
unix_msg: Reformat unix_dgram_send a bit
This makes the next commit a bit more readable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Mon, 24 Nov 2014 15:26:13 +0000 (16:26 +0100)]
s3-smbclient: Return success if we listed the shares.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10960
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Mon, 24 Nov 2014 13:34:24 +0000 (14:34 +0100)]
dsdb: Remove a self-assignment
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Mon, 24 Nov 2014 13:52:42 +0000 (14:52 +0100)]
dbwrap: Fix a enum conversion
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): Mon Nov 24 18:36:00 CET 2014 on sn-devel-104
Jelmer Vernooij [Sat, 1 Nov 2014 20:54:31 +0000 (13:54 -0700)]
Print number of slow tests from script rather than wscript.
Change-Id: I6eaa0803b95cc81f514a2176f4e06f1e3fff4077
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Mon Nov 24 13:06:46 CET 2014 on sn-devel-104
Jelmer Vernooij [Sun, 2 Nov 2014 17:00:09 +0000 (09:00 -0800)]
sam: Use samba.tests.subunitrun.
Change-Id: Ic2ac4b335cf805ddbd442a065c4eaf6ef2b210d9
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>