sfrench/samba-autobuild/.git
9 years agoRemove iniparser.
Jeremy Allison [Wed, 13 Aug 2014 23:41:33 +0000 (16:41 -0700)]
Remove iniparser.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug 14 23:52:07 CEST 2014 on sn-devel-104

9 years agoRemove popt/iniparser from .clang_complete
Jeremy Allison [Thu, 14 Aug 2014 18:12:30 +0000 (18:12 +0000)]
Remove popt/iniparser from .clang_complete

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoDon't build iniparser anymore.
Jeremy Allison [Wed, 13 Aug 2014 23:40:40 +0000 (16:40 -0700)]
Don't build iniparser anymore.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoReplace all uses of iniparser with tiniparser.
Jeremy Allison [Wed, 13 Aug 2014 23:36:28 +0000 (16:36 -0700)]
Replace all uses of iniparser with tiniparser.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoAdd tiniparser - tiny version of iniparser that only implements what Samba uses.
Jeremy Allison [Wed, 13 Aug 2014 23:00:00 +0000 (16:00 -0700)]
Add tiniparser - tiny version of iniparser that only implements what Samba uses.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoUse tini in preference.
Volker Lendecke [Wed, 13 Aug 2014 05:24:21 +0000 (07:24 +0200)]
Use tini in preference.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoAdd tini parser.
Volker Lendecke [Tue, 12 Aug 2014 11:02:35 +0000 (13:02 +0200)]
Add tini parser.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoctdb-readonly: Do not abort if revoke of readonly record fails on a node
Amitay Isaacs [Tue, 12 Aug 2014 13:58:00 +0000 (23:58 +1000)]
ctdb-readonly: Do not abort if revoke of readonly record fails on a node

Revoking readonly record involves first marking the record on dmaster as
RO_REVOKING_READONLY.  Then all the other nodes are sent update_record
control to get rid of RO_DELEGATION.  Once that succeeds, the record
is marked RO_REVOKING_COMPLETE.

Currently, revoking of readonly delegations on the nodes is tried only
once.  If a node goes in recovery, it can fail update_record control and
revoke code will abort ctdb.  Since database recovery would revoke all
readonly delegations anyway, there is no reason to abort.  Simply undo
the start of revoke process by resetting RO_REVOKING_READONLY flag.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Aug 13 11:24:09 CEST 2014 on sn-devel-104

9 years agoctdb-readonly: Add an early return to simplify code
Amitay Isaacs [Tue, 12 Aug 2014 13:54:39 +0000 (23:54 +1000)]
ctdb-readonly: Add an early return to simplify code

This patch makes the subsequent logic change small and easier to
understand.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
9 years agoctdb-doc: Fix default database directories in ctdbd.1
Martin Schwenke [Sun, 10 Aug 2014 09:02:42 +0000 (19:02 +1000)]
ctdb-doc: Fix default database directories in ctdbd.1

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): Wed Aug 13 07:06:42 CEST 2014 on sn-devel-104

9 years agoFixed a memory leak in cli_set_mntpoint().
Har Gagan Sahai [Wed, 6 Aug 2014 09:02:35 +0000 (14:32 +0530)]
Fixed a memory leak in cli_set_mntpoint().

Fixes bug #10759 - Memory leak in libsmbclient in cli_set_mntpoint function

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

Signed-off-by: Har Gagan Sahai <SHarGagan@novell.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 13 04:36:50 CEST 2014 on sn-devel-104

9 years agomessaging3: Include messages_dgm.h only in messages.c
Volker Lendecke [Sun, 27 Jul 2014 10:31:21 +0000 (12:31 +0200)]
messaging3: Include messages_dgm.h only in messages.c

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 Aug 12 02:21:32 CEST 2014 on sn-devel-104

9 years agomessaging3: Move messaging_hdr handling to messages.c.
Volker Lendecke [Sun, 27 Jul 2014 10:29:26 +0000 (12:29 +0200)]
messaging3: Move messaging_hdr handling to messages.c.

This makes messages_dgm a simple byte-transport across processes that
knows almost nothing about server_id etc.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Only store the pid in messaging_dgm_context
Volker Lendecke [Fri, 25 Jul 2014 11:03:11 +0000 (11:03 +0000)]
messaging3: Only store the pid in messaging_dgm_context

That's all we need here

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Save 48 bytes .text
Volker Lendecke [Fri, 25 Jul 2014 10:42:19 +0000 (10:42 +0000)]
messaging3: Save 48 bytes .text

9 years agomessaging3: Remove one-context protection from messages.c
Volker Lendecke [Sat, 9 Aug 2014 15:18:04 +0000 (17:18 +0200)]
messaging3: Remove one-context protection from messages.c

messages_dgm.c takes care of it.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Protect messaging_dgm against multiple contexts
Volker Lendecke [Sun, 20 Jul 2014 12:51:47 +0000 (14:51 +0200)]
messaging3: Protect messaging_dgm against multiple contexts

We can't rely on posix locking within a process

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Add messages_dgm.h
Volker Lendecke [Thu, 17 Jul 2014 11:57:51 +0000 (11:57 +0000)]
messaging3: Add messages_dgm.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Pass on msg_type unmasked
Volker Lendecke [Thu, 17 Jul 2014 11:56:18 +0000 (11:56 +0000)]
messaging3: Pass on msg_type unmasked

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: I don't see 2 versions running concurrently...
Volker Lendecke [Thu, 17 Jul 2014 11:55:33 +0000 (11:55 +0000)]
messaging3: I don't see 2 versions running concurrently...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Avoid "enum messaging_type" in messages_dgm
Volker Lendecke [Thu, 17 Jul 2014 11:51:13 +0000 (11:51 +0000)]
messaging3: Avoid "enum messaging_type" in messages_dgm

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Pass dir_owner to messaging_dgm_init()
Volker Lendecke [Thu, 17 Jul 2014 11:47:32 +0000 (11:47 +0000)]
messaging3: Pass dir_owner to messaging_dgm_init()

9 years agomessaging3: Pass cache_dir to messaging_dgm_init()
Volker Lendecke [Thu, 17 Jul 2014 11:38:36 +0000 (11:38 +0000)]
messaging3: Pass cache_dir to messaging_dgm_init()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Move [un]become_root() calls out of messaging_dgm_send()
Volker Lendecke [Thu, 17 Jul 2014 11:34:24 +0000 (11:34 +0000)]
messaging3: Move [un]become_root() calls out of messaging_dgm_send()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Move sec_init() call out of messaging_dgm_init()
Volker Lendecke [Thu, 17 Jul 2014 11:33:26 +0000 (11:33 +0000)]
messaging3: Move sec_init() call out of messaging_dgm_init()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Directly refer to messaging_dgm in messages.c
Volker Lendecke [Thu, 17 Jul 2014 11:23:46 +0000 (11:23 +0000)]
messaging3: Directly refer to messaging_dgm in messages.c

This removes the messaging_backend abstraction layer from messages_dgm.c. That
layer was introduced for ctdb and is still used there. But as the messaging_dgm
interface is very slim anyway, I don't think directly calling it is too bad.

Why this commit? It is another step towards making messages_dgm
independent of messages.[ch], thus it might become usable in other
contexts like ctdb and source4

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agosmbd: Use messaging_cleanup()
Volker Lendecke [Thu, 17 Jul 2014 11:05:02 +0000 (11:05 +0000)]
smbd: Use messaging_cleanup()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Add messaging_cleanup
Volker Lendecke [Thu, 17 Jul 2014 11:01:00 +0000 (11:01 +0000)]
messaging3: Add messaging_cleanup

Rename smbcontrol's dgm-cleanup to msg-cleanup. We haven't published
this UI yet :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging_dgm: Remove unused "messaging_context"
Volker Lendecke [Thu, 17 Jul 2014 09:58:50 +0000 (09:58 +0000)]
messaging_dgm: Remove unused "messaging_context"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Explicitly pass server_id to messaging_dgm_init
Volker Lendecke [Thu, 17 Jul 2014 09:56:39 +0000 (09:56 +0000)]
messaging3: Explicitly pass server_id to messaging_dgm_init

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Explicitly pass tevent_context to messaging_dgm_init
Volker Lendecke [Thu, 17 Jul 2014 09:52:28 +0000 (09:52 +0000)]
messaging3: Explicitly pass tevent_context to messaging_dgm_init

One dependency less on messaging_context()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging_dgm: Receive through a cb function
Volker Lendecke [Thu, 17 Jul 2014 09:44:41 +0000 (09:44 +0000)]
messaging_dgm: Receive through a cb function

This avoids calling messaging_dispatch_rec directly from messaging_dgm.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agosmbd: Add debugs to smbXsrv_open.c
Volker Lendecke [Mon, 7 Jul 2014 11:49:49 +0000 (11:49 +0000)]
smbd: Add debugs to smbXsrv_open.c

At one point it was pretty difficult to track a failure. Add more DEBUG
to avoid gdb

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): Mon Aug 11 23:32:45 CEST 2014 on sn-devel-104

9 years agosmbd: Pass down "lease" to open_file_ntcreate
Volker Lendecke [Wed, 21 Aug 2013 15:58:23 +0000 (15:58 +0000)]
smbd: Pass down "lease" to open_file_ntcreate

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agosmbd: Pass down "lease" to create_file_unixpath
Volker Lendecke [Wed, 21 Aug 2013 15:56:50 +0000 (15:56 +0000)]
smbd: Pass down "lease" to create_file_unixpath

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agovfs3: Pass "lease" through SMB_VFS_CREATE_FILE
Volker Lendecke [Wed, 21 Aug 2013 13:56:14 +0000 (13:56 +0000)]
vfs3: Pass "lease" through SMB_VFS_CREATE_FILE

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoMAINTAINERS: Remove MAINTAINERS.txt
Ira Cooper [Sun, 10 Aug 2014 15:11:26 +0000 (11:11 -0400)]
MAINTAINERS: Remove MAINTAINERS.txt

Due to the new code review rules, there is no more need for the
MAINTAINERS.txt file.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Fix an error path memleak
Volker Lendecke [Sat, 9 Aug 2014 16:51:05 +0000 (16:51 +0000)]
messaging3: Fix an error path memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: avoid dereferencing null lp_ctx
David Disseldorp [Mon, 11 Aug 2014 15:51:58 +0000 (17:51 +0200)]
param: avoid dereferencing null lp_ctx

process_smbconf_service() calls lp_do_section() with a NULL userdata
(struct loadparm_context *) argument. Since 0864d4945, lp_do_section()
unconditionally attempts to set the lp_ctx->bInGlobalSection variable,
resulting in a segfault.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Aug 11 21:00:15 CEST 2014 on sn-devel-104

9 years agoparam: remove unimplemented find_service() check
David Disseldorp [Mon, 11 Aug 2014 15:29:27 +0000 (17:29 +0200)]
param: remove unimplemented find_service() check

Check for "default VFS service" is empty, and we don't currently provide
such a feature.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoctdb-build: popt has moved from lib/ to third_party/
Amitay Isaacs [Mon, 11 Aug 2014 06:02:27 +0000 (16:02 +1000)]
ctdb-build: popt has moved from lib/ to third_party/

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Aug 11 10:58:43 CEST 2014 on sn-devel-104

9 years agoctdb-build: Replace indentation tabs with spaces
Amitay Isaacs [Mon, 11 Aug 2014 06:02:00 +0000 (16:02 +1000)]
ctdb-build: Replace indentation tabs with spaces

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
9 years agolib/popt: Remove non third_party popt.
Ira Cooper [Wed, 23 Jul 2014 04:11:01 +0000 (21:11 -0700)]
lib/popt: Remove non third_party popt.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Sat Aug  9 20:47:05 CEST 2014 on sn-devel-104

9 years agothird_party/popt: Initial support for popt.
Ira Cooper [Wed, 23 Jul 2014 04:34:17 +0000 (21:34 -0700)]
third_party/popt: Initial support for popt.

ctdb, ldb, and samba are supported builds for third_party popt.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agothird_party/popt: Initial copy of popt.
Ira Cooper [Wed, 23 Jul 2014 07:17:30 +0000 (00:17 -0700)]
third_party/popt: Initial copy of popt.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/zlib: Remove non third_party zlib.
Ira Cooper [Wed, 23 Jul 2014 07:16:24 +0000 (00:16 -0700)]
lib/zlib: Remove non third_party zlib.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agothird_party/zlib: Initial support for zlib
Ira Cooper [Wed, 23 Jul 2014 04:27:13 +0000 (21:27 -0700)]
third_party/zlib: Initial support for zlib

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agothird_party/zlib: Initial copy of zlib.
Ira Cooper [Wed, 23 Jul 2014 04:26:40 +0000 (21:26 -0700)]
third_party/zlib: Initial copy of zlib.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/iniparser: Remove non third_party iniparser.
Ira Cooper [Thu, 17 Jul 2014 22:07:31 +0000 (18:07 -0400)]
lib/iniparser: Remove non third_party iniparser.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agothird_party/iniparser: Initial support for iniparser.
Ira Cooper [Thu, 17 Jul 2014 22:04:35 +0000 (18:04 -0400)]
third_party/iniparser: Initial support for iniparser.

This is the initial support for iniparser, as well the basic
third_party framework.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agothird_party/iniparser: Initial copy of iniparser.
Ira Cooper [Thu, 17 Jul 2014 21:31:05 +0000 (17:31 -0400)]
third_party/iniparser: Initial copy of iniparser.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agonsswitch: Fix bogus #include line.
Ira Cooper [Wed, 16 Jul 2014 21:40:57 +0000 (17:40 -0400)]
nsswitch: Fix bogus #include line.

We are not allowed to reach around behind the system's back and
include the wrong headerfiles.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agopassdb: add missing newline to debug message in get_primary_group_sid()
Justin Maggard [Fri, 8 Aug 2014 17:19:41 +0000 (10:19 -0700)]
passdb: add missing newline to debug message in get_primary_group_sid()

Signed-off-by: Justin Maggard <jmaggard@netgear.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sat Aug  9 00:44:06 CEST 2014 on sn-devel-104

9 years agoRevert "doc: Add new parameters to vfs_full_audit man page"
Christof Schmitt [Fri, 8 Aug 2014 17:00:43 +0000 (10:00 -0700)]
Revert "doc: Add new parameters to vfs_full_audit man page"

This reverts commit 685af0342ea7324086661a506e1d0ee15ab07f16.

Volker's patches already added the description to the manpage.

Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Fri Aug  8 21:47:58 CEST 2014 on sn-devel-104

9 years agos4-auth: Initialize the tokens by default.
Andreas Schneider [Fri, 18 Jul 2014 10:57:20 +0000 (12:57 +0200)]
s4-auth: Initialize the tokens by default.

Found with valgrind.

Signed-off-by: Andreas Schneider <asn@samba.org>
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Aug  8 19:01:56 CEST 2014 on sn-devel-104

9 years agokrb5_wrap: Use com_err in krb5_warnx.
Andreas Schneider [Tue, 20 May 2014 12:30:16 +0000 (14:30 +0200)]
krb5_wrap: Use com_err in krb5_warnx.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4-dsdb/cracknames: free realm from smb_krb5_principal_get_realm().
Günther Deschner [Thu, 15 May 2014 07:46:21 +0000 (09:46 +0200)]
s4-dsdb/cracknames: free realm from smb_krb5_principal_get_realm().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos3-libads/krb5_setpw: free realm from smb_krb5_principal_get_realm().
Günther Deschner [Thu, 15 May 2014 07:45:32 +0000 (09:45 +0200)]
s3-libads/krb5_setpw: free realm from smb_krb5_principal_get_realm().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agolib/krb5_wrap: make sure smb_krb5_principal_get_realm returns a malloced string.
Günther Deschner [Thu, 15 May 2014 07:44:23 +0000 (09:44 +0200)]
lib/krb5_wrap: make sure smb_krb5_principal_get_realm returns a malloced string.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agowscript: Only build gensec_krb5 with heimdal.
Andreas Schneider [Thu, 7 Aug 2014 13:28:57 +0000 (15:28 +0200)]
wscript: Only build gensec_krb5 with heimdal.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agoprinting: reload printer shares on OpenPrinter
David Disseldorp [Tue, 5 Aug 2014 15:33:33 +0000 (17:33 +0200)]
printing: reload printer shares on OpenPrinter

The printer share inventory should be reloaded on open _and_
enumeration, as there are some clients, such as cupsaddsmb, that do not
perform an enumeration prior to access.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Aug  8 16:33:50 CEST 2014 on sn-devel-104

9 years agosmbd: split printer reload processing
David Disseldorp [Fri, 1 Aug 2014 14:25:59 +0000 (16:25 +0200)]
smbd: split printer reload processing

All printer inventory updates are currently done via
delete_and_reload_printers(), which handles registry.tdb updates for
added or removed printers, AD printer unpublishing on removal, as well
as share service creation and deletion.

This change splits this functionality into two functions such that
per-client smbd processes do not perform registry.tdb updates or printer
unpublishing. This is now only performed by the process that performs
the printcap cache update.

This change is similar to ac6604868d1325dd4c872dc0f6ab056d10ebaecf from
the 3.6 branch.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agoserver: remove duplicate snum_is_shared_printer()
David Disseldorp [Tue, 5 Aug 2014 16:45:24 +0000 (18:45 +0200)]
server: remove duplicate snum_is_shared_printer()

Only keep a single definition in server_reload.c

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agosmbd: only reprocess printer_list.tdb if it changed
David Disseldorp [Wed, 23 Jul 2014 12:42:00 +0000 (14:42 +0200)]
smbd: only reprocess printer_list.tdb if it changed

The per-client smbd printer share inventory is currently updated from
printer_list.tdb when a client enumerates printers, via EnumPrinters or
NetShareEnum.
printer_list.tdb is populated by the background print process, based on
the latest printcap values retrieved from the printing backend (e.g.
CUPS) at regular intervals.
This change ensures that per-client smbd processes don't reparse
printer_list.tdb if it hasn't been updated since the last enumeration.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Suggested-by: Volker Lendecke <vl@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agoprinting: return last change time with pcap_cache_loaded()
David Disseldorp [Wed, 23 Jul 2014 10:12:34 +0000 (12:12 +0200)]
printing: return last change time with pcap_cache_loaded()

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agoprinting: remove pcap_cache_add()
David Disseldorp [Fri, 25 Jul 2014 10:18:54 +0000 (12:18 +0200)]
printing: remove pcap_cache_add()

All print list updates are now done via pcap_cache_replace(), which can
call into the print_list code directly.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agoprinting: reload printer_list.tdb from in memory list
David Disseldorp [Tue, 22 Jul 2014 18:17:38 +0000 (20:17 +0200)]
printing: reload printer_list.tdb from in memory list

This will allow in future for a single atomic printer_list.tdb update.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agoprinting: only reload printer shares on client enum
David Disseldorp [Fri, 11 Jul 2014 15:00:05 +0000 (17:00 +0200)]
printing: only reload printer shares on client enum

Currently, automatic printer share updates are handled in the following
way:
- Background printer process (BPP) forked on startup
- Parent smbd and per-client children await MSG_PRINTER_PCAP messages
- BPP periodically polls the printing backend for printcap data
- printcap data written to printer_list.tdb
- MSG_PRINTER_PCAP sent to all smbd processes following update
- smbd processes all read the latest printer_list.tdb data, and update
  their share listings

This procedure is not scalable, as all smbd processes hit
printer_list.tdb in parallel, resulting in a large spike in CPU usage.

This change sees smbd processes only update their printer share lists
only when a client asks for this information, e.g. via NetShareEnum or
EnumPrinters.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Suggested-by: Volker Lendecke <vl@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agoprinting: traverse_read the printer list for share updates
David Disseldorp [Wed, 9 Jul 2014 22:18:10 +0000 (00:18 +0200)]
printing: traverse_read the printer list for share updates

The printcap update procedure involves the background printer process
obtaining the printcap information from the printing backend, writing
this to printer_list.tdb, and then notifying all smbd processes of the
new list. The processes then all attempt to simultaneously traverse
printer_list.tdb, in order to update their local share lists.

With a large number of printers, and a large number of per-client smbd
processes, this traversal results in significant lock contention, mostly
due to the fact that the traversal is unnecessarily done with an
exclusive (write) lock on the printer_list.tdb database.

This commit changes the share update code path to perform a read-only
traversal.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652

Reported-by: Alex K <korobkin+samba@gmail.com>
Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agolib/krb5_wrap: provide krb5_warnx() replacement.
Günther Deschner [Thu, 8 May 2014 13:06:51 +0000 (15:06 +0200)]
lib/krb5_wrap: provide krb5_warnx() replacement.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug  8 08:30:50 CEST 2014 on sn-devel-104

9 years agolib/krb5_wrap: use krb5_copy_data_contents in smb_krb5_principal_set_realm.
Günther Deschner [Tue, 13 May 2014 15:33:07 +0000 (17:33 +0200)]
lib/krb5_wrap: use krb5_copy_data_contents in smb_krb5_principal_set_realm.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agolib/krb5_wrap: provide CKSUMTYPE_HMAC_MD5 type matching MIT.
Günther Deschner [Thu, 8 May 2014 12:54:06 +0000 (14:54 +0200)]
lib/krb5_wrap: provide CKSUMTYPE_HMAC_MD5 type matching MIT.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agolib/krb5_wrap: define KRB5_PW_SALT if it is not already there.
Günther Deschner [Thu, 8 May 2014 12:31:37 +0000 (14:31 +0200)]
lib/krb5_wrap: define KRB5_PW_SALT if it is not already there.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agolib/krb5_wrap: add smb_krb5_principal_get_type().
Günther Deschner [Thu, 8 May 2014 10:13:00 +0000 (12:13 +0200)]
lib/krb5_wrap: add smb_krb5_principal_get_type().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agoauth/credentials_krb5: silence a build warning.
Günther Deschner [Thu, 8 May 2014 08:12:01 +0000 (10:12 +0200)]
auth/credentials_krb5: silence a build warning.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agolib/krb5_wrap: add smb_krb5_principal_set_realm().
Günther Deschner [Thu, 8 May 2014 07:57:21 +0000 (09:57 +0200)]
lib/krb5_wrap: add smb_krb5_principal_set_realm().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agolib/krb5_wrap: use const principal in smb_krb5_principal_get_realm().
Günther Deschner [Thu, 8 May 2014 08:06:13 +0000 (10:06 +0200)]
lib/krb5_wrap: use const principal in smb_krb5_principal_get_realm().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agowscript: add check for krb5_keyblock_init.
Günther Deschner [Thu, 8 May 2014 07:46:25 +0000 (09:46 +0200)]
wscript: add check for krb5_keyblock_init.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4-gensec_krb5: fix memleak in gensec_krb5_session_info().
Günther Deschner [Tue, 6 May 2014 11:47:28 +0000 (13:47 +0200)]
s4-gensec_krb5: fix memleak in gensec_krb5_session_info().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agolib/krb5_wrap: add krb5_copy_data_contents.
Günther Deschner [Thu, 8 May 2014 12:59:00 +0000 (14:59 +0200)]
lib/krb5_wrap: add krb5_copy_data_contents.

This reuses krb5_data_copy() if available, choosed not to call it
krb5_data_copy as that is easily mixed up with krb5_copy_data (which allocs the
krb5_data pointer). Thanks Simo for proposing the better name.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4-heimdal: fix krb5_get_init_creds_opt_set_process_last_req().
Günther Deschner [Wed, 7 May 2014 06:19:56 +0000 (08:19 +0200)]
s4-heimdal: fix krb5_get_init_creds_opt_set_process_last_req().

Most probably just a copy/paste error.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4-auth/kerberos: add a note how to implement krb5_get_init_creds_opt_set_win2k(...
Günther Deschner [Wed, 7 May 2014 06:24:15 +0000 (08:24 +0200)]
s4-auth/kerberos: add a note how to implement krb5_get_init_creds_opt_set_win2k() with MIT.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4-kerberos: remove duplicate macros.
Günther Deschner [Tue, 6 May 2014 09:30:51 +0000 (11:30 +0200)]
s4-kerberos: remove duplicate macros.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4-dsdb/samdb: use smb_krb5_principal_get_comp_string in ldb ACL module.
Günther Deschner [Wed, 30 Apr 2014 08:26:17 +0000 (10:26 +0200)]
s4-dsdb/samdb: use smb_krb5_principal_get_comp_string in ldb ACL module.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agolib/krb5_wrap: add smb_krb5_principal_get_comp_string().
Günther Deschner [Wed, 30 Apr 2014 08:49:14 +0000 (10:49 +0200)]
lib/krb5_wrap: add smb_krb5_principal_get_comp_string().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agolib/krb5_wrap: move krb5_princ_size replacement code to lib/krb5_wrap/krb5_samba.c.
Günther Deschner [Wed, 30 Apr 2014 08:46:20 +0000 (10:46 +0200)]
lib/krb5_wrap: move krb5_princ_size replacement code to lib/krb5_wrap/krb5_samba.c.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agoauth/credentials-krb5: use get_kerberos_allowed_etypes().
Günther Deschner [Tue, 29 Apr 2014 16:22:55 +0000 (18:22 +0200)]
auth/credentials-krb5: use get_kerberos_allowed_etypes().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agos4-torture: use smb_krb5_get_allowed_weak_crypto() in remote PAC test.
Günther Deschner [Tue, 29 Apr 2014 16:14:35 +0000 (18:14 +0200)]
s4-torture: use smb_krb5_get_allowed_weak_crypto() in remote PAC test.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>

9 years agolib/krb5_wrap: add smb_krb5_get_allowed_weak_crypto().
Günther Deschner [Tue, 29 Apr 2014 16:14:05 +0000 (18:14 +0200)]
lib/krb5_wrap: add smb_krb5_get_allowed_weak_crypto().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>

9 years agolib/krb5_wrap: remove unused create_kerberos_key_from_string_direct().
Günther Deschner [Fri, 25 Apr 2014 12:15:48 +0000 (14:15 +0200)]
lib/krb5_wrap: remove unused create_kerberos_key_from_string_direct().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>

9 years agosamba: use smb_krb5_create_key_from_string() in some places.
Günther Deschner [Fri, 25 Apr 2014 12:14:20 +0000 (14:14 +0200)]
samba: use smb_krb5_create_key_from_string() in some places.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>

9 years agolib/krb5_wrap: add smb_krb5_create_key_from_string().
Günther Deschner [Fri, 25 Apr 2014 12:12:05 +0000 (14:12 +0200)]
lib/krb5_wrap: add smb_krb5_create_key_from_string().

This function can take either a calculated salt or a principal and calculate the
salt on its own.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>

9 years agolib/krb5_wrap: add smb_krb5_get_pw_salt().
Günther Deschner [Fri, 25 Apr 2014 12:03:35 +0000 (14:03 +0200)]
lib/krb5_wrap: add smb_krb5_get_pw_salt().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>

9 years agos4-dsdb/samdb: use smb_krb5_make_principal for compatibility reasons with MIT.
Günther Deschner [Fri, 25 Apr 2014 11:59:11 +0000 (13:59 +0200)]
s4-dsdb/samdb: use smb_krb5_make_principal for compatibility reasons with MIT.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agodoc: Add new parameters to vfs_full_audit man page
Christof Schmitt [Thu, 7 Aug 2014 19:01:56 +0000 (12:01 -0700)]
doc: Add new parameters to vfs_full_audit man page

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug  8 00:37:48 CEST 2014 on sn-devel-104

9 years agovfs_full_audit: Optionally log security descriptors in FSET_NT_ACL
Volker Lendecke [Thu, 7 Aug 2014 10:53:33 +0000 (10:53 +0000)]
vfs_full_audit: Optionally log security descriptors in FSET_NT_ACL

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agovfs_full_audit: Add "full_audit:syslog"
Volker Lendecke [Thu, 7 Aug 2014 10:44:01 +0000 (10:44 +0000)]
vfs_full_audit: Add "full_audit:syslog"

Defaults to true (for compatibility)

With full_audit:syslog=false we DEBUG the messages with level 1.

You can explicitly [en|dis]able this with debug class full_audit:0/1

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agovfs_full_audit: Save full_audit:priority in private_data
Volker Lendecke [Thu, 7 Aug 2014 10:34:18 +0000 (10:34 +0000)]
vfs_full_audit: Save full_audit:priority in private_data

lp_parm_enum can become expensive

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agovfs_full_audit: Save full_audit:facility in private_data
Volker Lendecke [Thu, 7 Aug 2014 10:34:18 +0000 (10:34 +0000)]
vfs_full_audit: Save full_audit:facility in private_data

lp_parm_enum can become expensive

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agovfs_full_audit: Pass "vfs_full_audit_private_data" to log_failure/success()
Volker Lendecke [Thu, 7 Aug 2014 10:23:25 +0000 (10:23 +0000)]
vfs_full_audit: Pass "vfs_full_audit_private_data" to log_failure/success()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>