sfrench/samba-autobuild/.git
5 years agolibgpo: support probing for parameters in gp_inifile_get functions.
Günther Deschner [Thu, 12 Dec 2013 17:24:47 +0000 (18:24 +0100)]
libgpo: support probing for parameters in gp_inifile_get functions.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibgpo: check for talloc failures in ini file parsing routines.
Günther Deschner [Thu, 12 Dec 2013 17:23:47 +0000 (18:23 +0100)]
libgpo: check for talloc failures in ini file parsing routines.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agovfs_glusterfs: Enable per client log file
Poornima Gurusiddaiah [Fri, 22 Nov 2013 05:04:11 +0000 (05:04 +0000)]
vfs_glusterfs: Enable per client log file

In Samba configuration file, one of the options of gluster type is
log file, the value of this option was not allowed to contain any
variables, as a result all the clients would have a single log file,
which complicated debugging.
In this patch, variable substitution is performed for gluster log file.
Hence allowing user to customise the gluster log file name.

Signed-off-by: Poornima Gurusiddaiah <pgurusid@redhat.com>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec 17 23:44:16 CET 2013 on sn-devel-104

5 years agoctdb/eventscripts: Do not reconfigure in "monitor" events
Martin Schwenke [Mon, 9 Dec 2013 04:54:52 +0000 (15:54 +1100)]
ctdb/eventscripts: Do not reconfigure in "monitor" events

"monitor" events can be cancelled.  If a reconfigure action does a
service restart then the "monitor" event can be cancelled at the
inconvenient moment after the service is stopped.  In this case the
service stays down and the node may become unhealthy (depending on
whether there are any repair actions in the monitor event).

A long time ago we did service reconfiguration in "monitor" events
following failovers.  Service reconfiguration was then moved to the
"ipreallocated" event.  However, reconfiguration in "monitor" events
has been kept as a last resort in case an "ipreallocate" event does
not occur.  The only important case that this covers is "ctdb
deleteip", where "releaseip" events are generated without a
corresponding "ipreallocated".  Therefore, IPs can be deleted without
running the required service reconfiguration.

The supported way of removing IP addresses is now via "ctdb
reloadips", which always causes a takeover run with a corresponding
"ipreallocate" event.

This means that service reconfiguration in "monitor" events is no
longer required and should be removed because it is unsafe.

Also update the associated tests.  Make the first confirm that the
monitor event no longer does reconfiguration.  Change the others to
test that monitor status is correctly replayed when something else is
doing a reconfigure and currently holds the reconfigure lock.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Dec 17 06:32:35 CET 2013 on sn-devel-104

5 years agoshare_ldb: Fix a memleak
Volker Lendecke [Sun, 15 Dec 2013 20:28:08 +0000 (21:28 +0100)]
share_ldb: Fix a memleak

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): Tue Dec 17 03:50:58 CET 2013 on sn-devel-104

5 years agoshare_ldb: Fix CID 1138336 Dereference null return value
Volker Lendecke [Sun, 15 Dec 2013 20:28:08 +0000 (21:28 +0100)]
share_ldb: Fix CID 1138336 Dereference null return value

False positive, but this way we avoid another strchr

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoshare_ldb: Fix a memleak
Volker Lendecke [Sun, 15 Dec 2013 20:29:59 +0000 (21:29 +0100)]
share_ldb: Fix a memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoshare_ldb: Fix CID 1138337 Dereference null return value
Volker Lendecke [Sun, 15 Dec 2013 20:28:08 +0000 (21:28 +0100)]
share_ldb: Fix CID 1138337 Dereference null return value

False positive, but this way we avoid another strchr

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoldb: Fix 1138330 Dereference null return value
Volker Lendecke [Sun, 15 Dec 2013 20:23:59 +0000 (21:23 +0100)]
ldb: Fix 1138330 Dereference null return value

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Fix CID 1138328 Logically dead code
Volker Lendecke [Sun, 15 Dec 2013 20:18:07 +0000 (21:18 +0100)]
smbd: Fix CID 1138328 Logically dead code

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoscannedonly: Fix CID 242109 Unchecked return value from library
Volker Lendecke [Sun, 15 Dec 2013 20:07:00 +0000 (21:07 +0100)]
scannedonly: Fix CID 242109 Unchecked return value from library

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agontvfs: Fix CID 241291 Argument cannot be negative
Volker Lendecke [Sun, 15 Dec 2013 20:00:04 +0000 (21:00 +0100)]
ntvfs: Fix CID 241291 Argument cannot be negative

getgroups can return -1, which talloc_array won't be happy about

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotevent: Fix CID 1138326 Unchecked return value
Volker Lendecke [Sun, 15 Dec 2013 19:40:06 +0000 (20:40 +0100)]
tevent: Fix CID 1138326 Unchecked return value

For this case we explicitly have added tevent_req_oom

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoFix CID 1138340 Resource leak
Volker Lendecke [Sun, 15 Dec 2013 19:28:53 +0000 (20:28 +0100)]
Fix CID 1138340 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoFix CID 1138341 Resource leak
Volker Lendecke [Sun, 15 Dec 2013 19:28:04 +0000 (20:28 +0100)]
Fix CID 1138341 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotdb_util: Fix whitespace
Volker Lendecke [Sun, 15 Dec 2013 19:23:16 +0000 (20:23 +0100)]
tdb_util: Fix whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotdb_util: Fix CID 1138343 Uninitialized scalar variable
Volker Lendecke [Sun, 15 Dec 2013 19:22:36 +0000 (20:22 +0100)]
tdb_util: Fix CID 1138343 Uninitialized scalar variable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3: Handle stat call with capability in vfs_gpfs
Abhidnya Joshi [Tue, 10 Dec 2013 10:01:43 +0000 (11:01 +0100)]
s3: Handle stat call with capability in vfs_gpfs

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Mon Dec 16 20:05:23 CET 2013 on sn-devel-104

5 years agos3: Add DAC_OVERRIDE capability support
Abhidnya Joshi [Tue, 10 Dec 2013 08:10:21 +0000 (09:10 +0100)]
s3: Add DAC_OVERRIDE capability support

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
5 years agogencache: Fix a type-punned warning
Volker Lendecke [Mon, 16 Dec 2013 11:42:46 +0000 (12:42 +0100)]
gencache: Fix a type-punned warning

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): Mon Dec 16 17:11:13 CET 2013 on sn-devel-104

5 years agos3: smbpasswd - fix crashes on invalid input.
Jeremy Allison [Thu, 12 Dec 2013 17:37:25 +0000 (09:37 -0800)]
s3: smbpasswd - fix crashes on invalid input.

get_pass can return NULL on error. Ensure that
this is always the case and fix all callers to cope
(some already did).

Reported by Joonas Kuorilehto <joneskoo@codenomicon.com>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10320

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Dec 16 15:17:58 CET 2013 on sn-devel-104

5 years agoauth_samba4: Describe the slightly unusual role of auth_samba4
Andrew Bartlett [Fri, 13 Dec 2013 00:38:29 +0000 (13:38 +1300)]
auth_samba4: Describe the slightly unusual role of auth_samba4

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Dec 16 03:18:00 CET 2013 on sn-devel-104

5 years agos3:smbd: avoid calling fd_is_readable() without async echo handler
Stefan Metzmacher [Wed, 11 Dec 2013 14:02:27 +0000 (15:02 +0100)]
s3:smbd: avoid calling fd_is_readable() without async echo handler

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Dec 14 20:19:10 CET 2013 on sn-devel-104

5 years agos3:lib: avoid talloc_zero_array() in poll_one_fd()
Stefan Metzmacher [Wed, 4 Dec 2013 22:31:10 +0000 (23:31 +0100)]
s3:lib: avoid talloc_zero_array() in poll_one_fd()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3:smbd: use PATH_MAX for the buffer passed to full_path_tos()
Stefan Metzmacher [Sat, 14 Dec 2013 09:45:42 +0000 (10:45 +0100)]
s3:smbd: use PATH_MAX for the buffer passed to full_path_tos()

We use this in other places too and it's better than a hardcoded value.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotdb: Avoid reallocs for lockrecs
Volker Lendecke [Mon, 9 Dec 2013 09:56:33 +0000 (09:56 +0000)]
tdb: Avoid reallocs for lockrecs

In normal operations we have at most 3 entries in this array. Don't
bother with shrinking.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Dec 14 13:19:47 CET 2013 on sn-devel-104

5 years agosmbd: Early exit
Volker Lendecke [Fri, 6 Dec 2013 10:31:22 +0000 (10:31 +0000)]
smbd: Early exit

Yes, this also showed up in profiles

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Implement and use full_path_tos
Volker Lendecke [Fri, 6 Dec 2013 14:34:05 +0000 (14:34 +0000)]
smbd: Implement and use full_path_tos

Yes, this looks like a hack, but talloc_asprintf does show up high in
profiles called from these routines

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Avoid pointless strcsequal calls
Volker Lendecke [Fri, 6 Dec 2013 12:10:37 +0000 (12:10 +0000)]
smbd: Avoid pointless strcsequal calls

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agodbwrap: No lock_order check if not required
Volker Lendecke [Fri, 6 Dec 2013 11:57:42 +0000 (11:57 +0000)]
dbwrap: No lock_order check if not required

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agodbwrap_cache: Check negative first
Volker Lendecke [Sat, 7 Dec 2013 12:58:43 +0000 (12:58 +0000)]
dbwrap_cache: Check negative first

dbwrap_cache is right now used for notify most, and we hope to have very
few notifies around. So negative hits will be more likely than positive

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agodbwrap_cache: Fix dbwrap_cache_validate
Volker Lendecke [Sat, 7 Dec 2013 12:58:07 +0000 (12:58 +0000)]
dbwrap_cache: Fix dbwrap_cache_validate

Classic brown paper bag bug :-(

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Simplify get_share_mode_lock a bit
Volker Lendecke [Fri, 6 Dec 2013 07:40:03 +0000 (07:40 +0000)]
smbd: Simplify get_share_mode_lock a bit

This does two things: It gets rid of a talloc_stackframe in a hot
code path and to me it makes the code easier to understand. It makes
the talloc hierarchy more obvious to follow.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agodbwrap: Avoid a stackframe in fetch_locked_internal
Volker Lendecke [Fri, 6 Dec 2013 11:38:12 +0000 (11:38 +0000)]
dbwrap: Avoid a stackframe in fetch_locked_internal

This shows in profiles. We call this so often that this is a pretty
hot code path.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoiconv: Use a static buffer in iconf not to spoil the talloc_pool
Volker Lendecke [Fri, 6 Dec 2013 10:31:07 +0000 (10:31 +0000)]
iconv: Use a static buffer in iconf not to spoil the talloc_pool

This is a buffer that is strictly used like a stack variable. This
patch makes it one and while there it fixes an error path memleak.
In the "pull_failed" case we did not talloc_free(cvtbuf). With
talloc_tos(), this does not really matter, but for code without
this it does.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosmbd: Fix a false DEBUG fn name
Volker Lendecke [Sun, 8 Dec 2013 16:41:04 +0000 (16:41 +0000)]
smbd: Fix a false DEBUG fn name

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agotorture3: Do not depend on epoll
Volker Lendecke [Fri, 13 Dec 2013 13:55:45 +0000 (14:55 +0100)]
torture3: Do not depend on epoll

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agosecacl: Slightly simplify make_sec_acl
Volker Lendecke [Fri, 6 Dec 2013 09:29:19 +0000 (09:29 +0000)]
secacl: Slightly simplify make_sec_acl

This avoids a complex if-expression

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): Sat Dec 14 00:10:21 CET 2013 on sn-devel-104

5 years agosecacl: Fix a memleak in an error path
Volker Lendecke [Fri, 6 Dec 2013 09:28:40 +0000 (09:28 +0000)]
secacl: Fix a memleak in an error path

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosecacl: Don't use talloc_zero
Volker Lendecke [Fri, 6 Dec 2013 09:26:25 +0000 (09:26 +0000)]
secacl: Don't use talloc_zero

We initialize all but one field anyway

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosecacl: Fix whitespace
Volker Lendecke [Fri, 6 Dec 2013 09:25:20 +0000 (09:25 +0000)]
secacl: Fix whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:rpc_server/lsa_lookup fix a compile warning
Christian Ambach [Tue, 10 Dec 2013 19:31:21 +0000 (20:31 +0100)]
s4:rpc_server/lsa_lookup fix a compile warning

about a set, but unused variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec 13 01:49:50 CET 2013 on sn-devel-104

5 years agos4:libcli fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:54:37 +0000 (17:54 +0100)]
s4:libcli fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:kdc fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:54:05 +0000 (17:54 +0100)]
s4:kdc fix compiler warnings

about set but unused variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:echo_server fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:53:49 +0000 (17:53 +0100)]
s4:echo_server fix compiler warnings

about set but unused variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:53:15 +0000 (17:53 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:52:30 +0000 (17:52 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:52:29 +0000 (17:52 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:52:29 +0000 (17:52 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:52:29 +0000 (17:52 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:dsdb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:52:29 +0000 (17:52 +0100)]
s4:dsdb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:winbindd fix a compiler warning
Christian Ambach [Tue, 10 Dec 2013 16:50:36 +0000 (17:50 +0100)]
s3:winbindd fix a compiler warning

about a potentially uninitialized variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd/smb2 fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:49:44 +0000 (17:49 +0100)]
s3:smbd/smb2 fix compiler warnings

about a potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:printing fix a compiler warning
Christian Ambach [Tue, 10 Dec 2013 16:49:18 +0000 (17:49 +0100)]
s3:printing fix a compiler warning

about a potentially uninitialized variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:libsmb fix a compiler warning
Christian Ambach [Tue, 10 Dec 2013 16:48:59 +0000 (17:48 +0100)]
s3:libsmb fix a compiler warning

about a potentially uninitialized variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:48:25 +0000 (17:48 +0100)]
libcli: fix compiler warnings

about missing prototypes

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/clap fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:47:50 +0000 (17:47 +0100)]
lib/clap fix compiler warnings

about set but unused variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/tdb: fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:47:05 +0000 (17:47 +0100)]
lib/tdb: fix compiler warnings

about a variable shadowing a global declaration

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/ldb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:46:30 +0000 (17:46 +0100)]
lib/ldb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/ldb fix compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:45:58 +0000 (17:45 +0100)]
lib/ldb fix compiler warnings

about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/ldb-samba: fix a compiler warning
Christian Ambach [Tue, 10 Dec 2013 16:45:14 +0000 (17:45 +0100)]
lib/ldb-samba: fix a compiler warning

about macro redefinition

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/compression: fix a compiler warnings
Christian Ambach [Tue, 10 Dec 2013 16:43:55 +0000 (17:43 +0100)]
lib/compression: fix a compiler warnings

about set but unused variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowaf docs: build the new vfs worm man page
Björn Baumbach [Wed, 20 Nov 2013 13:24:21 +0000 (14:24 +0100)]
waf docs: build the new vfs worm man page

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodocs-man: add manual page for the new worm vfs module
Björn Baumbach [Wed, 20 Nov 2013 12:00:04 +0000 (13:00 +0100)]
docs-man: add manual page for the new worm vfs module

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3-waf: build new vfs_worm module
Volker Lendecke [Wed, 20 Nov 2013 11:11:41 +0000 (12:11 +0100)]
s3-waf: build new vfs_worm module

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3-modules: add new vfs_worm module
Volker Lendecke [Wed, 20 Nov 2013 11:09:47 +0000 (12:09 +0100)]
s3-modules: add new vfs_worm module

VFS module to disallow writes for older files.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib-util: add functions to get elapsed from given timespec structs
Volker Lendecke [Wed, 20 Nov 2013 11:00:17 +0000 (12:00 +0100)]
lib-util: add functions to get elapsed from given timespec structs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agodocs: Add kill-client-ip to smbcontrol manpage
Christof Schmitt [Fri, 6 Dec 2013 23:03:30 +0000 (16:03 -0700)]
docs: Add kill-client-ip to smbcontrol manpage

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Thu Dec 12 20:45:44 CET 2013 on sn-devel-104

5 years agos3:utils/smbcontrol implement kill-client-ip in smbcontrol
Christian Ambach [Fri, 15 Mar 2013 14:09:18 +0000 (15:09 +0100)]
s3:utils/smbcontrol implement kill-client-ip in smbcontrol

allows the admin to forcefully shutdown the connection of a specified client by IP address

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd react on message that client should be disconnected
Christian Ambach [Fri, 15 Mar 2013 14:08:22 +0000 (15:08 +0100)]
s3:smbd react on message that client should be disconnected

if MSG_SMB_KILL_CLIENT_IP message comes in and our client has
the IP address given as argument, then shutdown the connection immediately

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:messaging add MSG_SMB_KILL_CLIENT_IP message
Christian Ambach [Fri, 15 Mar 2013 14:06:41 +0000 (15:06 +0100)]
s3:messaging add MSG_SMB_KILL_CLIENT_IP message

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoshadow_copy2: Fix some typos
David Keegel [Thu, 12 Dec 2013 11:08:58 +0000 (12:08 +0100)]
shadow_copy2: Fix some typos

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Dec 12 17:58:24 CET 2013 on sn-devel-104

5 years agolibgpo/security_CSE: more preamble header checks of SecEdit/GptTmpl.inf files.
Günther Deschner [Tue, 10 Dec 2013 23:59:55 +0000 (00:59 +0100)]
libgpo/security_CSE: more preamble header checks of SecEdit/GptTmpl.inf files.

$CHICAGO$ needs to be double quoted.

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): Thu Dec 12 15:31:14 CET 2013 on sn-devel-104

5 years agolibgpo/security_CSE: fix unicode preamble check of SecEdit/GptTmpl.inf files.
Günther Deschner [Tue, 10 Dec 2013 23:50:03 +0000 (00:50 +0100)]
libgpo/security_CSE: fix unicode preamble check of SecEdit/GptTmpl.inf files.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibgpo: add gp_inifile_getbool().
Günther Deschner [Tue, 10 Dec 2013 23:44:49 +0000 (00:44 +0100)]
libgpo: add gp_inifile_getbool().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibgpo: fix segfault in gpo_process_gpo_list().
Günther Deschner [Tue, 10 Dec 2013 17:06:14 +0000 (18:06 +0100)]
libgpo: fix segfault in gpo_process_gpo_list().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibgpo: make sure we correctly can store the group policy state.
Günther Deschner [Tue, 10 Dec 2013 16:39:54 +0000 (17:39 +0100)]
libgpo: make sure we correctly can store the group policy state.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibgpo: remove use of deprecated talloc functions.
Günther Deschner [Tue, 10 Dec 2013 22:44:23 +0000 (23:44 +0100)]
libgpo: remove use of deprecated talloc functions.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibgpo: remove unused libgpo wscript_build.
Günther Deschner [Tue, 10 Dec 2013 22:18:17 +0000 (23:18 +0100)]
libgpo: remove unused libgpo wscript_build.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibgpo: use existing connection to the ds for the sysvol queries.
Günther Deschner [Tue, 10 Dec 2013 21:50:47 +0000 (22:50 +0100)]
libgpo: use existing connection to the ds for the sysvol queries.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibgpo: remove unused loadparm_context from functions.
Günther Deschner [Tue, 10 Dec 2013 17:26:51 +0000 (18:26 +0100)]
libgpo: remove unused loadparm_context from functions.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibgpo: remove duplicate parse_gpt_ini header.
Günther Deschner [Tue, 10 Dec 2013 09:10:22 +0000 (10:10 +0100)]
libgpo: remove duplicate parse_gpt_ini header.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agotevent: version 0.9.20 tevent-0.9.20
Stefan Metzmacher [Fri, 27 Sep 2013 02:06:00 +0000 (04:06 +0200)]
tevent: version 0.9.20

This adds the following new features:

- tevent_queue_wait_send/recv()
- tevent_num_signals()
- tevent_sa_info_queue_count()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Dec 12 00:39:35 CET 2013 on sn-devel-104

5 years agotevent: give the user the chance to ask for TEVENT_NUM_SIGNALS and TEVENT_SA_INFO_QUE...
Stefan Metzmacher [Mon, 9 Dec 2013 09:32:00 +0000 (10:32 +0100)]
tevent: give the user the chance to ask for TEVENT_NUM_SIGNALS and TEVENT_SA_INFO_QUEUE_COUNT

This way the caller can change use the supported limits without using hardcoded
values.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10214
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: change TEVENT_SA_INFO_QUEUE_COUNT from 64 to 256
Stefan Metzmacher [Mon, 9 Dec 2013 09:29:45 +0000 (10:29 +0100)]
tevent: change TEVENT_SA_INFO_QUEUE_COUNT from 64 to 256

There are some existing callers which assume the old
SA_INFO_QUEUE_COUNT 100 value.

256 should give room for the future.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10214
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: tevent_epoll_set_panic_fallback() can be a void function
Stefan Metzmacher [Wed, 11 Dec 2013 17:58:41 +0000 (18:58 +0100)]
tevent: tevent_epoll_set_panic_fallback() can be a void function

There's no case where this could return an error.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: make use of talloc_get_type_abort() in tevent_epoll.c
Stefan Metzmacher [Thu, 5 Dec 2013 07:47:27 +0000 (08:47 +0100)]
tevent: make use of talloc_get_type_abort() in tevent_epoll.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: make use of talloc_get_type_abort() in tevent_signal.c
Stefan Metzmacher [Thu, 5 Dec 2013 07:47:27 +0000 (08:47 +0100)]
tevent: make use of talloc_get_type_abort() in tevent_signal.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: make use of talloc_get_type_abort() in tevent_select.c
Stefan Metzmacher [Thu, 5 Dec 2013 07:47:27 +0000 (08:47 +0100)]
tevent: make use of talloc_get_type_abort() in tevent_select.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: make use of talloc_get_type_abort() in tevent_req.c
Stefan Metzmacher [Thu, 5 Dec 2013 07:47:27 +0000 (08:47 +0100)]
tevent: make use of talloc_get_type_abort() in tevent_req.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: make use of talloc_get_type_abort() in tevent_queue.c
Stefan Metzmacher [Thu, 5 Dec 2013 07:47:27 +0000 (08:47 +0100)]
tevent: make use of talloc_get_type_abort() in tevent_queue.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: use talloc_get_type_abort() in the documentation examples
Stefan Metzmacher [Thu, 5 Dec 2013 07:46:47 +0000 (08:46 +0100)]
tevent: use talloc_get_type_abort() in the documentation examples

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: add tevent_queue_wait_send/recv()
Gregor Beck [Thu, 19 Sep 2013 13:14:25 +0000 (15:14 +0200)]
tevent: add tevent_queue_wait_send/recv()

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: tevent_req_create() already uses ZERO_STRUCT(req)
Stefan Metzmacher [Fri, 27 Sep 2013 01:02:24 +0000 (03:02 +0200)]
tevent: tevent_req_create() already uses ZERO_STRUCT(req)

There's no need to zero individual members.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: let tevent_req_received() clear the private_cancel function
Stefan Metzmacher [Fri, 27 Sep 2013 00:59:22 +0000 (02:59 +0200)]
tevent: let tevent_req_received() clear the private_cancel function

This makes sure it's not called when the private state is already gone.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agotevent: cancel the timeout timer when the request is finished
Stefan Metzmacher [Sat, 17 Sep 2011 17:53:55 +0000 (19:53 +0200)]
tevent: cancel the timeout timer when the request is finished

As we might defer the callback with tevent_req_defer_callback()
when calling tevent_req_done(), we should cancel the timeout directly.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3/rpc_server: don't unmarshall PDUs twice
David Disseldorp [Tue, 10 Dec 2013 12:59:06 +0000 (13:59 +0100)]
s3/rpc_server: don't unmarshall PDUs twice

DCE/RPC PDUs are currently unmarshalled firstly by the generic librpc
dcerpc_read_ncacn_packet_[send/recv] functions, and subsequently a
second time by the source3 rpc_server, which ignores the unmarshalled
packet and re-parses the receive buffer.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Dec 11 22:24:31 CET 2013 on sn-devel-104

5 years agoshadow_copy2: add a comment explaining why we don't talloc_zero_array().
Michael Adam [Wed, 11 Dec 2013 08:41:38 +0000 (09:41 +0100)]
shadow_copy2: add a comment explaining why we don't talloc_zero_array().

Since I stumbled over this slighly sublte point, I thought it is
worthwile to point it our in a comment.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Dec 11 19:55:20 CET 2013 on sn-devel-104

5 years agoshadow_copy2: revert expensive and unnecessary zero-initialization
Michael Adam [Wed, 11 Dec 2013 08:34:47 +0000 (09:34 +0100)]
shadow_copy2: revert expensive and unnecessary zero-initialization

I was being overly cautious. This is initialization is not
necessary, since further down in the for-loop, the memory
always gets fully initialized because the insert string is
inserted at various slash positions.

So this talloc_zero_array can be skipped: this an expensive
thing to do in virtually every VFS call.

This essentially reverts commit 249e9b4a34d8959bd94735c1921ecfc24d6a2705.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib:util: fix a comment typo
Michael Adam [Wed, 11 Dec 2013 16:47:36 +0000 (17:47 +0100)]
lib:util: fix a comment typo

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>