kai/samba.git
11 years agosmbd: Split create_conn_struct into a fn that does not change the working dir
Andrew Bartlett [Wed, 10 Oct 2012 02:47:49 +0000 (13:47 +1100)]
smbd: Split create_conn_struct into a fn that does not change the working dir

The python bindings do not want the current working directory changed
during operations, so we provide two functions, one providing the
original behaviour, and other providing the python bindings with just
the memory allocation and initilisation stuff.

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agospoolss: add stubs for new JobNamedProperty dcerpc calls.
Günther Deschner [Mon, 7 Jan 2013 14:15:21 +0000 (15:15 +0100)]
spoolss: add stubs for new JobNamedProperty dcerpc calls.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jan  7 19:06:25 CET 2013 on sn-devel-104

11 years agospoolss: add SPOOLSS_DRIVER_VERSION_2012 (4) define to IDL.
Günther Deschner [Mon, 7 Jan 2013 14:14:30 +0000 (15:14 +0100)]
spoolss: add SPOOLSS_DRIVER_VERSION_2012 (4) define to IDL.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agospoolss: add Windows ARM architecture defines to IDL.
Günther Deschner [Mon, 7 Jan 2013 14:14:02 +0000 (15:14 +0100)]
spoolss: add Windows ARM architecture defines to IDL.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agotdb: Fix undefined prototype warnings
Volker Lendecke [Fri, 14 Dec 2012 21:49:05 +0000 (22:49 +0100)]
tdb: Fix undefined prototype warnings

These functions are deliberately left without prototypes according to
3fdeaa399, but without prototypes we get warnings.

Reviewed-by: Rusty Russell <rusty@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan  7 11:20:19 CET 2013 on sn-devel-104

11 years agotdb: Fix \n in error messages
Volker Lendecke [Wed, 26 Dec 2012 20:42:14 +0000 (21:42 +0100)]
tdb: Fix \n in error messages

Reviewed-by: Rusty Russell <rusty@samba.org>
11 years agos3-net: Fix rpc_service_list_internal() null pointer passing.
Andreas Schneider [Fri, 21 Dec 2012 15:03:51 +0000 (16:03 +0100)]
s3-net: Fix rpc_service_list_internal() null pointer passing.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Found by Coverity.

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Jan  2 14:19:50 CET 2013 on sn-devel-104

11 years agos3-rpcclient: Fix cmd_eventlog_loginfo() null pointer passing.
Andreas Schneider [Fri, 21 Dec 2012 14:58:49 +0000 (15:58 +0100)]
s3-rpcclient: Fix cmd_eventlog_loginfo() null pointer passing.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Found by Coverity.

11 years agos3-rpcclient: Fix cmd_eventlog_readlog() null pointer passing.
Andreas Schneider [Fri, 21 Dec 2012 14:52:02 +0000 (15:52 +0100)]
s3-rpcclient: Fix cmd_eventlog_readlog() null pointer passing.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Found by Coverity.

11 years agos3-idmap: Check return value of string_to_sid().
Andreas Schneider [Fri, 14 Dec 2012 15:54:55 +0000 (16:54 +0100)]
s3-idmap: Check return value of string_to_sid().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
11 years agodocs: Fix typo in vfs_tsmsm.8.xml.
Samba-JP oota [Wed, 2 Jan 2013 09:21:51 +0000 (10:21 +0100)]
docs: Fix typo in vfs_tsmsm.8.xml.

Reviewed-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Wed Jan  2 12:12:12 CET 2013 on sn-devel-104

11 years agodocs: Remove superfluous bracket.
Samba-JP oota [Wed, 2 Jan 2013 08:12:14 +0000 (09:12 +0100)]
docs: Remove superfluous bracket.

Reviewed-by: Karolin Seeger <kseeger@samba.org>
11 years agos4:drsuapi: try to behave more like windows for usn order (bug #9508)
Stefan Metzmacher [Sat, 15 Dec 2012 09:18:08 +0000 (10:18 +0100)]
s4:drsuapi: try to behave more like windows for usn order (bug #9508)

We don't behave completely like a Windows server, but it's much more
identical than before.

The partition head is always the first object followed by the rest
sorted by uSNChanged.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan  1 21:09:42 CET 2013 on sn-devel-104

11 years agos4:drsuapi: make use of LDB_TYPESAFE_QSORT() and pass getnc_state
Stefan Metzmacher [Tue, 18 Dec 2012 14:16:28 +0000 (15:16 +0100)]
s4:drsuapi: make use of LDB_TYPESAFE_QSORT() and pass getnc_state

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:drsuapi: make sure we report the meta data from the cycle start (bug #9508)
Stefan Metzmacher [Tue, 18 Dec 2012 13:59:20 +0000 (14:59 +0100)]
s4:drsuapi: make sure we report the meta data from the cycle start (bug #9508)

We should build the final highwatermark and uptodatevector of
a replication cycle at the start of the cycle. Before we
search for the currently missing objects.

Otherwise we risk that some objects get lost.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:drsuapi: check the source_dsa_invocation_id (bug #9508)
Stefan Metzmacher [Tue, 18 Dec 2012 12:40:33 +0000 (13:40 +0100)]
s4:drsuapi: check the source_dsa_invocation_id (bug #9508)

The given highwatermark is only valid relative to the
specified source_dsa_invocation_id.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:drsuapi: make sure we never return the same highwatermark twice in a replication...
Stefan Metzmacher [Mon, 17 Dec 2012 10:30:26 +0000 (11:30 +0100)]
s4:drsuapi: make sure we never return the same highwatermark twice in a replication cycle (bug #9508)

If the highwatermark given by the client is not the one we expect,
we need to start a new replication cycle. Otherwise the destination dsa
skips objects and linked attribute values.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:drsuapi: add drsuapi_DsReplicaHighWaterMark_cmp()
Stefan Metzmacher [Mon, 17 Dec 2012 10:13:43 +0000 (11:13 +0100)]
s4:drsuapi: add drsuapi_DsReplicaHighWaterMark_cmp()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:drsuapi: always use the current uptodateness_vector
Stefan Metzmacher [Mon, 17 Dec 2012 15:34:25 +0000 (16:34 +0100)]
s4:drsuapi: always use the current uptodateness_vector

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:drsuapi: avoid a ldb_dn_copy() and use talloc_move() instead
Stefan Metzmacher [Tue, 18 Dec 2012 11:44:43 +0000 (12:44 +0100)]
s4:drsuapi: avoid a ldb_dn_copy() and use talloc_move() instead

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:drsuapi: remove unused 'highest_usn' from drsuapi_getncchanges_state
Stefan Metzmacher [Mon, 17 Dec 2012 12:48:01 +0000 (13:48 +0100)]
s4:drsuapi: remove unused 'highest_usn' from drsuapi_getncchanges_state

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:drsuapi: move struct drsuapi_getncchanges_state to the top of getncchanges.c
Stefan Metzmacher [Mon, 17 Dec 2012 13:08:56 +0000 (14:08 +0100)]
s4:drsuapi: move struct drsuapi_getncchanges_state to the top of getncchanges.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:dsdb/drepl: update the source_dsa_obj/invocation_id in repsFrom
Stefan Metzmacher [Wed, 19 Dec 2012 16:31:28 +0000 (17:31 +0100)]
s4:dsdb/drepl: update the source_dsa_obj/invocation_id in repsFrom

The highwatermark is relative to the source_dsa_invocation_id.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:dsdb/common: use 01.01.1970 as last_sync_success for our entry in the uptodatevector
Stefan Metzmacher [Wed, 19 Dec 2012 16:33:13 +0000 (17:33 +0100)]
s4:dsdb/common: use 01.01.1970 as last_sync_success for our entry in the uptodatevector

This matches a Windows 2008R2 and 2012 server.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:dsdb/common: use LDB_SEQ_HIGHEST_SEQ for our entry in the uptodatevector
Stefan Metzmacher [Wed, 19 Dec 2012 11:47:43 +0000 (12:47 +0100)]
s4:dsdb/common: use LDB_SEQ_HIGHEST_SEQ for our entry in the uptodatevector

We should use the global highestCommittedUSN, not the per partition value.

This matches a Windows 2008R2 and 2012 server.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:dsdb/repl_meta_data: don't merge highwatermark and uptodatevector (bug #9508)
Stefan Metzmacher [Tue, 18 Dec 2012 13:46:23 +0000 (14:46 +0100)]
s4:dsdb/repl_meta_data: don't merge highwatermark and uptodatevector (bug #9508)

We should not do any magic regarding the highwatermark we got from
the source dsa. We need to treat it as opaque and not try to be smart
and merge it into the uptodatevector.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:dsdb/repl_meta_data: also update the last_sync_success in replUpToDateVector
Stefan Metzmacher [Thu, 20 Dec 2012 14:46:05 +0000 (15:46 +0100)]
s4:dsdb/repl_meta_data: also update the last_sync_success in replUpToDateVector

This matches Windows 2008R2 and Windows 2012.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:dsdb/repl_meta_data: store the last results and timestamps in the repsFrom
Stefan Metzmacher [Wed, 19 Dec 2012 16:29:04 +0000 (17:29 +0100)]
s4:dsdb/repl_meta_data: store the last results and timestamps in the repsFrom

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:dsdb/repl_meta_data: always treat the highwatermark as opaque (bug #9508)
Stefan Metzmacher [Tue, 18 Dec 2012 13:46:23 +0000 (14:46 +0100)]
s4:dsdb/repl_meta_data: always treat the highwatermark as opaque (bug #9508)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:scripting/python: always treat the highwatermark as opaque (bug #9508)
Stefan Metzmacher [Tue, 18 Dec 2012 13:46:23 +0000 (14:46 +0100)]
s4:scripting/python: always treat the highwatermark as opaque (bug #9508)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoselftest/flapping: more samba4.rpc.samr.large-dc.two subtests are flakey
Stefan Metzmacher [Tue, 1 Jan 2013 14:43:57 +0000 (15:43 +0100)]
selftest/flapping: more samba4.rpc.samr.large-dc.two subtests are flakey

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan  1 18:47:42 CET 2013 on sn-devel-104

11 years agoHappy New Year 2013
Stefan Metzmacher [Tue, 1 Jan 2013 14:43:36 +0000 (15:43 +0100)]
Happy New Year 2013

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agosubunit: Update to latest upstream version.
Jelmer Vernooij [Wed, 26 Dec 2012 21:11:13 +0000 (22:11 +0100)]
subunit: Update to latest upstream version.

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Thu Dec 27 21:08:32 CET 2012 on sn-devel-104

11 years agotesttools: Update to latest upstream version.
Jelmer Vernooij [Wed, 26 Dec 2012 21:11:04 +0000 (22:11 +0100)]
testtools: Update to latest upstream version.

11 years agolib/param: use the correct path names again
Stefan Metzmacher [Thu, 27 Dec 2012 15:09:39 +0000 (16:09 +0100)]
lib/param: use the correct path names again

This fixes a regression which was introduced by commit
5b1d95046c8ea624419d94dd7d9e2785ba86f556.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Dec 27 19:19:55 CET 2012 on sn-devel-104

11 years agoselftest/flapping: mark samba4.rpc.samr.large-dc.two as knownfail
Stefan Metzmacher [Thu, 27 Dec 2012 14:35:58 +0000 (15:35 +0100)]
selftest/flapping: mark samba4.rpc.samr.large-dc.two as knownfail

This is really flakey lately:

https://git.samba.org/autobuild.flakey/2012-12-27-1533/samba.stdout
...
https://git.samba.org/autobuild.flakey/2012-12-10-2338/samba.stdout
...
https://git.samba.org/autobuild.flakey/2012-12-09-0135/samba.stdout
...
https://git.samba.org/autobuild.flakey/2012-12-06-0333/samba.stdout
...
https://git.samba.org/autobuild.flakey/2012-12-05-0731/samba.stdout
...
https://git.samba.org/autobuild.flakey/2012-12-03-0334/samba.stdout
...
https://git.samba.org/autobuild.flakey/2012-12-02-1532/samba.stdout

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Dec 27 17:36:07 CET 2012 on sn-devel-104

11 years agoselftest.pl: Fix typo 'snprintf' -> 'sprintf'.
Jelmer Vernooij [Sat, 15 Dec 2012 21:16:28 +0000 (22:16 +0100)]
selftest.pl: Fix typo 'snprintf' -> 'sprintf'.

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Wed Dec 26 22:35:12 CET 2012 on sn-devel-104

11 years agowafsamba: python-config is not always a script.
Jelmer Vernooij [Sun, 16 Dec 2012 14:01:53 +0000 (15:01 +0100)]
wafsamba: python-config is not always a script.

11 years agoRecent coverity changes added directory_create_or_exist() checks to many directories.
Jeremy Allison [Fri, 21 Dec 2012 23:16:10 +0000 (15:16 -0800)]
Recent coverity changes added directory_create_or_exist() checks to many directories.

These may not be needed, but in the meantime - ensure "make test" works again
by chmod'ing the created test directories from 0777 to 0755.

Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Dec 22 02:08:33 CET 2012 on sn-devel-104

11 years agos3-prefork: Directly fail if tevent_req_is_unix_error() fails.
Andreas Schneider [Thu, 13 Dec 2012 13:18:02 +0000 (14:18 +0100)]
s3-prefork: Directly fail if tevent_req_is_unix_error() fails.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Dec 21 15:38:19 CET 2012 on sn-devel-104

11 years agos3-libsmb: Remove check if array is NULL.
Andreas Schneider [Wed, 19 Dec 2012 13:10:05 +0000 (14:10 +0100)]
s3-libsmb: Remove check if array is NULL.

rdata is an array with data. rdlength defines how big rdata is. So if
rdlength is not set we have a big problem.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-rpc_server: Fix username and remote check.
Andreas Schneider [Wed, 19 Dec 2012 10:20:50 +0000 (11:20 +0100)]
s3-rpc_server: Fix username and remote check.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos4-libcli: Use a do-while loop.
Andreas Schneider [Wed, 19 Dec 2012 09:37:08 +0000 (10:37 +0100)]
s4-libcli: Use a do-while loop.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-lib: Cleanup transfer_file_internal() a bit.
Andreas Schneider [Tue, 18 Dec 2012 16:21:14 +0000 (17:21 +0100)]
s3-lib: Cleanup transfer_file_internal() a bit.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agolibgpo: Make it clear that we want to fall trough here.
Andreas Schneider [Tue, 18 Dec 2012 15:41:37 +0000 (16:41 +0100)]
libgpo: Make it clear that we want to fall trough here.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos4-dsdb: Make it clear that we want to fall trough here.
Andreas Schneider [Tue, 18 Dec 2012 15:39:40 +0000 (16:39 +0100)]
s4-dsdb: Make it clear that we want to fall trough here.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-rpc_server: Make it clear we want to fall trough here.
Andreas Schneider [Tue, 18 Dec 2012 15:36:07 +0000 (16:36 +0100)]
s3-rpc_server: Make it clear we want to fall trough here.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-lib: Make it clear that we want to fall trough here.
Andreas Schneider [Tue, 18 Dec 2012 15:33:14 +0000 (16:33 +0100)]
s3-lib: Make it clear that we want to fall trough here.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-netapi: Add missing break in NetUserSetInfo_r().
Andreas Schneider [Tue, 18 Dec 2012 15:31:36 +0000 (16:31 +0100)]
s3-netapi: Add missing break in NetUserSetInfo_r().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-libsmb: Fix a possible null pointer dereference.
Andreas Schneider [Tue, 18 Dec 2012 15:06:19 +0000 (16:06 +0100)]
s3-libsmb: Fix a possible null pointer dereference.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-rpc_server: Fix null pointer derefs in rpc_pipe_open_interface().
Andreas Schneider [Mon, 17 Dec 2012 16:46:34 +0000 (17:46 +0100)]
s3-rpc_server: Fix null pointer derefs in rpc_pipe_open_interface().

Found by Coverity and asn ;)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-winbind: Fix null pointer dereference in store_memory_creds().
Andreas Schneider [Mon, 17 Dec 2012 16:18:14 +0000 (17:18 +0100)]
s3-winbind: Fix null pointer dereference in store_memory_creds().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-vfs: Fix a null pointer deferference in vfs_media_harmony.
Andreas Schneider [Mon, 17 Dec 2012 14:36:32 +0000 (15:36 +0100)]
s3-vfs: Fix a null pointer deferference in vfs_media_harmony.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-rpc_server: Fix a possible null pointer dereference.
Andreas Schneider [Mon, 17 Dec 2012 14:31:21 +0000 (15:31 +0100)]
s3-rpc_server: Fix a possible null pointer dereference.

This variable can be set to NULL in an earlier function call.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-vfs: Fix typo in readonly_connect().
Andreas Schneider [Mon, 17 Dec 2012 14:21:10 +0000 (15:21 +0100)]
s3-vfs: Fix typo in readonly_connect().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agolibcli: Fix smb2cli_ioctl_send() if clause.
Andreas Schneider [Mon, 17 Dec 2012 14:17:45 +0000 (15:17 +0100)]
libcli: Fix smb2cli_ioctl_send() if clause.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agolibwbclient: Fix null check in process_domain_info_string().
Andreas Schneider [Mon, 17 Dec 2012 13:17:59 +0000 (14:17 +0100)]
libwbclient: Fix null check in process_domain_info_string().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-rpc_server: Fix useless check if we still have a valid string.
Andreas Schneider [Mon, 17 Dec 2012 13:40:17 +0000 (14:40 +0100)]
s3-rpc_server: Fix useless check if we still have a valid string.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-libads: Fix copy&paste error in ads_keytab_add_entry().
Andreas Schneider [Mon, 17 Dec 2012 13:33:45 +0000 (14:33 +0100)]
s3-libads: Fix copy&paste error in ads_keytab_add_entry().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-lib: Fix push_ucs2() for-loop.
Andreas Schneider [Mon, 17 Dec 2012 13:25:31 +0000 (14:25 +0100)]
s3-lib: Fix push_ucs2() for-loop.

ret is a bool and size is what we are looking for here, else the
statement can never be true.

Jeremy please check!

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-tldap: Fix dead code in tldap_sasl_bind_send().
Andreas Schneider [Mon, 17 Dec 2012 13:21:01 +0000 (14:21 +0100)]
s3-tldap: Fix dead code in tldap_sasl_bind_send().

dn can't be NULL cause it is set to "" in that case.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos4-librpc: Remove dead code in smb_send_request().
Andreas Schneider [Mon, 17 Dec 2012 13:08:59 +0000 (14:08 +0100)]
s4-librpc: Remove dead code in smb_send_request().

If trigger_read we return earlier.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agokrb5_wrap: Remove dead code in smb_krb5_renew_ticket().
Andreas Schneider [Mon, 17 Dec 2012 13:03:50 +0000 (14:03 +0100)]
krb5_wrap: Remove dead code in smb_krb5_renew_ticket().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agonsswitch: Fix wbclient BAIL macros.
Andreas Schneider [Mon, 17 Dec 2012 09:39:10 +0000 (10:39 +0100)]
nsswitch: Fix wbclient BAIL macros.

In the code you normally use:

BAIL_ON_WBC_ERROR;

but the last ; is statement never reached, so dead code.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agolibcli: Check schannel state return value of tdb_transaction_commit().
Andreas Schneider [Fri, 14 Dec 2012 17:21:26 +0000 (18:21 +0100)]
libcli: Check schannel state return value of tdb_transaction_commit().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-utils: Check return value of secrets_init().
Andreas Schneider [Fri, 14 Dec 2012 17:14:34 +0000 (18:14 +0100)]
s3-utils: Check return value of secrets_init().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-net: Check return values of push_reg_sz().
Andreas Schneider [Fri, 14 Dec 2012 17:07:10 +0000 (18:07 +0100)]
s3-net: Check return values of push_reg_sz().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agoparam: Correctly create directory and create common function.
Andreas Schneider [Fri, 14 Dec 2012 16:54:13 +0000 (17:54 +0100)]
param: Correctly create directory and create common function.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agolibrpc: Check return codes of ndr functions.
Andreas Schneider [Fri, 14 Dec 2012 16:43:36 +0000 (17:43 +0100)]
librpc: Check return codes of ndr functions.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agondr: Check return code of ndr_pull_advance().
Andreas Schneider [Fri, 14 Dec 2012 16:09:34 +0000 (17:09 +0100)]
ndr: Check return code of ndr_pull_advance().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos4-libnet: Checkr return codes in samsync_ldb_handle_domain().
Andreas Schneider [Fri, 14 Dec 2012 16:02:48 +0000 (17:02 +0100)]
s4-libnet: Checkr return codes in samsync_ldb_handle_domain().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-nmbd: Check if we created the directories correctly.
Andreas Schneider [Thu, 13 Dec 2012 17:16:34 +0000 (18:16 +0100)]
s3-nmbd: Check if we created the directories correctly.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-eventlog: Make sure the eventlog directory exists.
Andreas Schneider [Thu, 13 Dec 2012 16:50:55 +0000 (17:50 +0100)]
s3-eventlog: Make sure the eventlog directory exists.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos4-regsitry: Check return value of ldb_msg_add_empty().
Andreas Schneider [Thu, 13 Dec 2012 16:48:45 +0000 (17:48 +0100)]
s4-regsitry: Check return value of ldb_msg_add_empty().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-winbind: Check if we created the directories correctly.
Andreas Schneider [Thu, 13 Dec 2012 16:29:39 +0000 (17:29 +0100)]
s3-winbind: Check if we created the directories correctly.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos4-lib: Use directory_create_or_exist() to create messaging dir.
Andreas Schneider [Thu, 13 Dec 2012 15:10:38 +0000 (16:10 +0100)]
s4-lib: Use directory_create_or_exist() to create messaging dir.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-smbd: Check return code of SMB_VFS_{L}STAT.
Andreas Schneider [Thu, 13 Dec 2012 13:26:40 +0000 (14:26 +0100)]
s3-smbd: Check return code of SMB_VFS_{L}STAT.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos4-client: Check return codes in do_connect().
Andreas Schneider [Thu, 13 Dec 2012 13:11:29 +0000 (14:11 +0100)]
s4-client: Check return codes in do_connect().

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agotdb: Add a comment explaining the "check"
Volker Lendecke [Fri, 14 Dec 2012 15:07:11 +0000 (16:07 +0100)]
tdb: Add a comment explaining the "check"

I had to ask git blame to find why we have to do it here...

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Dec 21 13:54:39 CET 2012 on sn-devel-104

11 years agotdb: Make tdb_new_database() follow a more conventional style
Volker Lendecke [Fri, 14 Dec 2012 14:53:08 +0000 (15:53 +0100)]
tdb: Make tdb_new_database() follow a more conventional style

We usually "goto fail" on every error and then in normal flow set the
return variable to success. This patch removes a comment which from my
point of view is now obsolete. It violates the {} rule from README.Coding
here in favor of the style used in this function.

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Fix a typo
Volker Lendecke [Fri, 14 Dec 2012 13:50:08 +0000 (14:50 +0100)]
tdb: Fix a typo

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Fix a typo
Volker Lendecke [Fri, 14 Dec 2012 13:48:31 +0000 (14:48 +0100)]
tdb: Fix a typo

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Use tdb_lock_covered_by_allrecord_lock in tdb_unlock
Volker Lendecke [Fri, 14 Dec 2012 08:24:06 +0000 (09:24 +0100)]
tdb: Use tdb_lock_covered_by_allrecord_lock in tdb_unlock

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Factor out tdb_lock_covered_by_allrecord_lock from tdb_lock_list
Volker Lendecke [Fri, 14 Dec 2012 08:21:42 +0000 (09:21 +0100)]
tdb: Factor out tdb_lock_covered_by_allrecord_lock from tdb_lock_list

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Simplify logic in tdb_lock_list slightly
Volker Lendecke [Thu, 13 Dec 2012 21:14:34 +0000 (22:14 +0100)]
tdb: Simplify logic in tdb_lock_list slightly

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Slightly simplify tdb_lock_list
Volker Lendecke [Thu, 13 Dec 2012 20:58:00 +0000 (21:58 +0100)]
tdb: Slightly simplify tdb_lock_list

Avoid an else {} branch when we can do an early return

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Fix blank line endings
Volker Lendecke [Thu, 13 Dec 2012 12:31:59 +0000 (13:31 +0100)]
tdb: Fix blank line endings

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Fix a comment
Volker Lendecke [Fri, 14 Dec 2012 07:01:12 +0000 (08:01 +0100)]
tdb: Fix a comment

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Fix a typo
Volker Lendecke [Thu, 13 Dec 2012 11:36:29 +0000 (12:36 +0100)]
tdb: Fix a typo

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agotdb: Fix a missing CONVERT
Volker Lendecke [Tue, 11 Dec 2012 20:04:58 +0000 (21:04 +0100)]
tdb: Fix a missing CONVERT

methods->tdb_write expects data in on-disk format. For reading that
record, methods->tdb_read() has taken care of the on-disk to in-memory
representation according to the DOCONV() flag passed down. tdb_rec_write()
is a wrapper around methods->tdb_write just doing the CONVERT() on the
way to disk.

Reviewed-by: Rusty Russell <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoFix bug #9196 - defer_open is triggered multiple times on the same request.
Jeremy Allison [Fri, 14 Dec 2012 16:39:26 +0000 (08:39 -0800)]
Fix bug #9196 - defer_open is triggered multiple times on the same request.

get_deferred_open_message_state_smb2() is buggy in that it is checking
the wrong things to determine if an open is in the deferred state.

It checks if (smb2req->async_te == NULL) which is incorrect,
as we're not always async in a deferred open - remove this.

It should check instead state->open_was_deferred as this
is explicity set to 'true' when an open is going deferred,
so add this check.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Dec 18 14:19:13 CET 2012 on sn-devel-104

11 years agos4-rpc_server: use netlogon_creds_encrypt_samlogon().
Günther Deschner [Tue, 11 Dec 2012 22:53:22 +0000 (23:53 +0100)]
s4-rpc_server: use netlogon_creds_encrypt_samlogon().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Sun Dec 16 01:34:01 CET 2012 on sn-devel-104

11 years agos3-rpc_server: use netlogon_creds_encrypt_samlogon().
Günther Deschner [Tue, 11 Dec 2012 22:52:59 +0000 (23:52 +0100)]
s3-rpc_server: use netlogon_creds_encrypt_samlogon().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agolibcli/auth: add netlogon_creds_encrypt_samlogon_validation().
Günther Deschner [Fri, 14 Dec 2012 13:18:40 +0000 (14:18 +0100)]
libcli/auth: add netlogon_creds_encrypt_samlogon_validation().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agolibcli/auth: rename netlogon_creds_decrypt_samlogon() to netlogon_creds_decrypt_samlo...
Günther Deschner [Fri, 14 Dec 2012 13:17:22 +0000 (14:17 +0100)]
libcli/auth: rename netlogon_creds_decrypt_samlogon() to netlogon_creds_decrypt_samlogon_validation().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos3fs: make the log warning go away
Ricky Nance [Fri, 14 Dec 2012 02:52:46 +0000 (20:52 -0600)]
s3fs: make the log warning go away

standard input is not a socket, assuming -D option

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sat Dec 15 17:50:23 CET 2012 on sn-devel-104

11 years agotdr: Strip trailing whitespace.
Jelmer Vernooij [Fri, 26 Oct 2012 14:55:04 +0000 (06:55 -0800)]
tdr: Strip trailing whitespace.

11 years agos4-libnet: Fix setting the group handle and return codes.
Andreas Schneider [Thu, 6 Dec 2012 13:45:24 +0000 (14:45 +0100)]
s4-libnet: Fix setting the group handle and return codes.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Dec 13 01:01:14 CET 2012 on sn-devel-104

11 years agoutil: Remove unused fde_stdin in samba_runcmd.
Andreas Schneider [Wed, 12 Dec 2012 18:15:58 +0000 (19:15 +0100)]
util: Remove unused fde_stdin in samba_runcmd.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
11 years agos3-lib: Don't close the listener twice if we goto failed.
Andreas Schneider [Thu, 6 Dec 2012 10:11:15 +0000 (11:11 +0100)]
s3-lib: Don't close the listener twice if we goto failed.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>