kai/samba.git
8 years agodns: use dns_common_update_soa when adding/replacing records dns-update-soa-serial
Kai Blin [Mon, 10 Aug 2015 12:43:57 +0000 (14:43 +0200)]
dns: use dns_common_update_soa when adding/replacing records

Signed-off-by: Kai Blin <kai@samba.org>
8 years agorpc/dnsserver: Use common update_soa function directly
Kai Blin [Mon, 10 Aug 2015 08:28:15 +0000 (10:28 +0200)]
rpc/dnsserver: Use common update_soa function directly

Signed-off-by: Kai Blin <kai@samba.org>
8 years agodns: move update_soa function from rpc server to common
Kai Blin [Mon, 10 Aug 2015 08:24:28 +0000 (10:24 +0200)]
dns: move update_soa function from rpc server to common

Signed-off-by: Kai Blin <kai@samba.org>
8 years agodns_server: Fix a small memleak
Volker Lendecke [Fri, 7 Aug 2015 06:29:17 +0000 (08:29 +0200)]
dns_server: Fix a small memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Aug  7 12:57:02 CEST 2015 on sn-devel-104

8 years agodns_server: Don't call tevent_req_finish twice
Volker Lendecke [Fri, 7 Aug 2015 05:58:20 +0000 (07:58 +0200)]
dns_server: Don't call tevent_req_finish twice

Both tevent_req_werror and tevent_req_done call tevent_req_finish on a request.
This should not be done. We should only call either of both.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
8 years agos4:torture:vfs_fruit: add a test for stream names
Ralph Boehme [Sun, 10 May 2015 09:58:32 +0000 (11:58 +0200)]
s4:torture:vfs_fruit: add a test for stream names

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos4:torture:vfs_fruit: pass xattr name as arg to torture_setup_local_xattr()
Ralph Boehme [Thu, 6 Aug 2015 11:48:54 +0000 (13:48 +0200)]
s4:torture:vfs_fruit: pass xattr name as arg to torture_setup_local_xattr()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agovfs_catia: run translation on stream names
Ralph Boehme [Sat, 9 May 2015 13:12:41 +0000 (15:12 +0200)]
vfs_catia: run translation on stream names

With vfs_fruit option "fruit:encoding = native" we're already converting
stream names that contain illegal NTFS characters from their on-the-wire
Unicode Private Range encoding to their native ASCII representation.

Unfortunately the reverse mapping for stream names was not perfomed.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agovfs_streams_xattr: stream names may contain colons
Ralph Boehme [Sat, 9 May 2015 13:02:03 +0000 (15:02 +0200)]
vfs_streams_xattr: stream names may contain colons

With vfs_fruit option "fruit:encoding = native" we're already converting
stream names that contain illegal NTFS characters from their on-the-wire
Unicode Private Range encoding to their native ASCII representation.

As as result the name of xattrs storing the streams (via
vfs_streams_xattr) may contain a colon, so we have to use strrchr_m()
instead of strchr_m() for matching the stream type suffix.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agoctdb-tests: Add a policy routing test with misconfiguration
Martin Schwenke [Tue, 4 Aug 2015 07:03:50 +0000 (17:03 +1000)]
ctdb-tests: Add a policy routing test with misconfiguration

To support this, extend the "ip route add" stub to detect duplicate
routes.

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): Fri Aug  7 08:37:38 CEST 2015 on sn-devel-104

8 years agoctdb-tests: Make fake gateway different to actual public IPs
Martin Schwenke [Tue, 4 Aug 2015 06:12:31 +0000 (16:12 +1000)]
ctdb-tests: Make fake gateway different to actual public IPs

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agoctdb-scripts: Improve error handling for 50.samba testparm failure
Martin Schwenke [Thu, 30 Jul 2015 06:49:35 +0000 (16:49 +1000)]
ctdb-scripts: Improve error handling for 50.samba testparm failure

Also add tests.  Update testparm stub to fake error and timeout.  Add
timeout stub.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agoctdb-pmda: Add missing prototype declaration for non-static function
Amitay Isaacs [Mon, 3 Aug 2015 05:36:06 +0000 (15:36 +1000)]
ctdb-pmda: Add missing prototype declaration for non-static function

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
8 years agoctdb-daemon: Reset database statistics when resetting statistics
Amitay Isaacs [Thu, 2 Apr 2015 02:53:09 +0000 (13:53 +1100)]
ctdb-daemon: Reset database statistics when resetting statistics

When the ctdb statistics is reset, reset per database statistics to keep
it consistent with ctdb statistics.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
8 years agoctdb-system: Remove unused system specific calls
Amitay Isaacs [Mon, 3 Aug 2015 05:02:43 +0000 (15:02 +1000)]
ctdb-system: Remove unused system specific calls

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
8 years agosource3/rpc_client: Fix CID 1273041 Condition is redundant
Anoop C S [Mon, 3 Aug 2015 08:31:58 +0000 (14:01 +0530)]
source3/rpc_client: Fix CID 1273041 Condition is redundant

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Aug  7 01:31:23 CEST 2015 on sn-devel-104

8 years agolib/talloc: Fix CID 1291639 Missing unlock
Anoop C S [Mon, 3 Aug 2015 08:29:33 +0000 (13:59 +0530)]
lib/talloc: Fix CID 1291639 Missing unlock

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agolib/talloc: Fix CID 1291640 Missing unlock
Anoop C S [Mon, 3 Aug 2015 08:27:19 +0000 (13:57 +0530)]
lib/talloc: Fix CID 1291640 Missing unlock

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agosmbd: Log smb2 requests returning !OK with higher log level
Christof Schmitt [Wed, 5 Aug 2015 20:31:44 +0000 (13:31 -0700)]
smbd: Log smb2 requests returning !OK with higher log level

This can be useful for narrowing down problems without taking a full
level 10 trace.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agos4:rpc_server/netlogon: Fix for NetApp
Arvid Requate [Thu, 6 Aug 2015 13:00:25 +0000 (15:00 +0200)]
s4:rpc_server/netlogon: Fix for NetApp

This patch fixes an issue where NetApp filers joined to a
Samba/ADDC cannot resolve SIDs. Without this patch the issue
can only be avoided by setting "allow nt4 crypto = yes" in smb.conf.

The issue is triggered by NetApp filers in three steps:

1. The client calls netr_ServerReqChallenge to set up challenge tokens

2. Next it calls netr_ServerAuthenticate2 with NETLOGON_NEG_STRONG_KEYS
   set to 0. Native AD and Samba respond to this with
   NT_STATUS_DOWNGRADE_DETECTED. At this point Samba throws away
   the challenge token negotiated in the first step.

3. Next the client calls netr_ServerAuthenticate2 again, this time with
   NETLOGON_NEG_STRONG_KEYS set to 1.
   Samba returns NT_STATUS_ACCESS_DENIED as it has lost track
   of the challenge and denies logon with the message

   No challenge requested by client [CLNT1/CLNT1$], cannot authenticate

Git commit 321ebc99b5a00f82265aee741a48aa84b214d6e8 introduced
a workaround for a different but related issue. This patch makes a minor
adjustment to that commit to delay flushing the cached challenge until
it's clear that we are not in a NT_STATUS_DOWNGRADE_DETECTED
situation.

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

Signed-off-by: Arvid Requate <requate@univention.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug  6 20:29:04 CEST 2015 on sn-devel-104

8 years agodns: always add authority records
Kai Blin [Fri, 17 Jul 2015 13:27:51 +0000 (15:27 +0200)]
dns: always add authority records

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Thu Aug  6 14:06:52 CEST 2015 on sn-devel-104

8 years agodns: Add a SOA record to error replies
Kai Blin [Wed, 29 Oct 2014 12:41:53 +0000 (13:41 +0100)]
dns: Add a SOA record to error replies

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agodns: Also pass nsrecs to handle_question()
Kai Blin [Wed, 29 Oct 2014 12:39:16 +0000 (13:39 +0100)]
dns: Also pass nsrecs to handle_question()

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agodns: Just pass the name to create_response_rr
Kai Blin [Wed, 29 Oct 2014 12:36:58 +0000 (13:36 +0100)]
dns: Just pass the name to create_response_rr

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agodns: Add dns_get_authoritative_zone helper function
Kai Blin [Wed, 29 Oct 2014 12:35:36 +0000 (13:35 +0100)]
dns: Add dns_get_authoritative_zone helper function

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agoscript/librelease.sh: this is replaced by script/release.sh now
Stefan Metzmacher [Wed, 5 Aug 2015 13:41:29 +0000 (15:41 +0200)]
script/librelease.sh: this is replaced by script/release.sh now

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug  6 03:49:40 CEST 2015 on sn-devel-104

8 years agoscript/release.sh: This is a new script to do releases
Stefan Metzmacher [Tue, 4 Aug 2015 09:33:26 +0000 (11:33 +0200)]
script/release.sh: This is a new script to do releases

This will replace script/librelease.sh and is more flexible
and powerful.

  Usage: release.sh <PRODUCT> <COMMAND>

  PRODUCT: ldb, talloc, tevent, tdb, samba-rc
  COMMAND: fullrelease, create, push, upload, announce

GNUPGHOME=/path/to/private/gpg script/librelease.sh tdb
becomes
GNUPGHOME=/path/to/private/gpg script/release.sh tdb fullrelease

GNUPGHOME=/path/to/private/gpg script/librelease.sh samba
becomes
GNUPGHOME=/path/to/private/gpg script/release.sh samba-rc create
or later
GNUPGHOME=/path/to/private/gpg script/release.sh samba-stable create

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agowafsamba: don't add -DSTATIC_%s_MODULES* arguments for SAMBA_LIBRARY(pyembed=True)
Stefan Metzmacher [Mon, 3 Aug 2015 09:39:01 +0000 (11:39 +0200)]
wafsamba: don't add -DSTATIC_%s_MODULES* arguments for SAMBA_LIBRARY(pyembed=True)

Python helper libraries don't have any modules and having something like
'.cpython-34m' in the name, e.g. STATIC_pytalloc-util.cpython-34m_MODULES
breaks the build.

Another way to fix this would be removing PYTHON_SO_ABI_FLAG from the name.

This allows --extra-python=/usr/bin/python3 to work on Ubuntu 14.04.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoselftest: Add test for GSSAPI with no authenticator checksum mode
Andrew Bartlett [Fri, 26 Jun 2015 07:15:31 +0000 (19:15 +1200)]
selftest: Add test for GSSAPI with no authenticator checksum mode

This was seen in the wild, with a Huawei Unified Storage System S5500 V3 against the AD DC

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Aug  5 09:43:40 CEST 2015 on sn-devel-104

8 years agoheimdal/gssapi: Allow a NULL authenticator
Andrew Bartlett [Fri, 26 Jun 2015 07:14:56 +0000 (19:14 +1200)]
heimdal/gssapi: Allow a NULL authenticator

Some non-GSSAPI implementations that instead try to create compatible packets by wrapping krb5_mk_req()
can trigger a NULL authenticator here.  Assume this to be equvilent to specifying an all-zero
channel bindings and some reasonable (fixed) flags.

This was seen in the wild, with a Huawei Unified Storage System S5500 V3 against the AD DC

Original patch by Andrew Bartlett, restructured by Douglas Bagnall

Cherry-picked from upstream GIT 0a5de96d72cdea9e465412d7dba1e5d13e53dc09
which is the merge of https://github.com/heimdal/heimdal/pull/134

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11425
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agogensec: Add an option emulating another mode a client building GSSAPI/krb5 manually...
Andrew Bartlett [Fri, 26 Jun 2015 07:14:13 +0000 (19:14 +1200)]
gensec: Add an option emulating another mode a client building GSSAPI/krb5 manually uses

This was seen in the wild, with a Huawei Unified Storage System S5500 V3 against the AD DC

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11425
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agowaf: Add talloc as a dependency
Andreas Schneider [Tue, 4 Aug 2015 10:00:33 +0000 (12:00 +0200)]
waf: Add talloc as a dependency

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Aug  5 04:08:30 CEST 2015 on sn-devel-104

8 years agosdb: Assert if the HDB flags will change
Andreas Schneider [Mon, 3 Aug 2015 11:10:28 +0000 (13:10 +0200)]
sdb: Assert if the HDB flags will change

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agohdb-samba: Translate SDB errors to HDB errors
Andreas Schneider [Tue, 4 Aug 2015 09:35:45 +0000 (11:35 +0200)]
hdb-samba: Translate SDB errors to HDB errors

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agos4-torture: add test for CLUSCTL_NODE_GET_ID in clusapi_NodeControl.
Günther Deschner [Tue, 21 Jul 2015 13:31:20 +0000 (15:31 +0200)]
s4-torture: add test for CLUSCTL_NODE_GET_ID in clusapi_NodeControl.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
Autobuild-User(master): José A. Rivera <jarrpa@samba.org>
Autobuild-Date(master): Tue Aug  4 22:14:33 CEST 2015 on sn-devel-104

8 years agos3-rpcclient: add client for create enum ex.
Günther Deschner [Fri, 17 Jul 2015 09:39:52 +0000 (11:39 +0200)]
s3-rpcclient: add client for create enum ex.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agos4-torture: add more ndr tests for property lists.
Günther Deschner [Thu, 16 Jul 2015 22:14:09 +0000 (00:14 +0200)]
s4-torture: add more ndr tests for property lists.

This data is derived from clusapi_NodeControl.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agos4-torture: add torture test for clusapi_NodeControl.
Günther Deschner [Thu, 16 Jul 2015 21:28:33 +0000 (23:28 +0200)]
s4-torture: add torture test for clusapi_NodeControl.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agoclusapi: add clusapi_NodeControlCode to IDL.
Günther Deschner [Thu, 16 Jul 2015 21:22:18 +0000 (23:22 +0200)]
clusapi: add clusapi_NodeControlCode to IDL.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agos4-torture: add tests for GroupControl.
Günther Deschner [Thu, 16 Jul 2015 15:40:37 +0000 (17:40 +0200)]
s4-torture: add tests for GroupControl.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agoclusapi: add clusapi_GroupControlCode enum to IDL.
Günther Deschner [Thu, 16 Jul 2015 15:03:59 +0000 (17:03 +0200)]
clusapi: add clusapi_GroupControlCode enum to IDL.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agos4-torture: also test ClusterControl with a large initial buffer size.
Günther Deschner [Thu, 16 Jul 2015 06:21:27 +0000 (08:21 +0200)]
s4-torture: also test ClusterControl with a large initial buffer size.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agoclusapi: use winreg_Type in clusapi registry IDL.
Günther Deschner [Thu, 16 Jul 2015 06:08:51 +0000 (08:08 +0200)]
clusapi: use winreg_Type in clusapi registry IDL.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agos4-torture: add ndr testsuite for complex clusapi_PROPERTY_LIST structs.
Günther Deschner [Tue, 14 Jul 2015 13:55:57 +0000 (15:55 +0200)]
s4-torture: add ndr testsuite for complex clusapi_PROPERTY_LIST structs.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agoclusapi: use ClusterEnumType in clusapi_CreateEnumEx.
Günther Deschner [Mon, 13 Jul 2015 19:09:16 +0000 (21:09 +0200)]
clusapi: use ClusterEnumType in clusapi_CreateEnumEx.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agos4-torture: add test for clusapi_CreateEnumEx().
Günther Deschner [Mon, 13 Jul 2015 19:08:23 +0000 (21:08 +0200)]
s4-torture: add test for clusapi_CreateEnumEx().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agoclusapi: add PROPERTY_LIST IDL.
Günther Deschner [Fri, 10 Jul 2015 13:49:33 +0000 (15:49 +0200)]
clusapi: add PROPERTY_LIST IDL.

Note this is hand-marshalled in Windows, seen in ClusterControl reqplies for a
CLUSCTL_CLUSTER_GET_RO_COMMON_PROPERTIES control.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agos4-torture: add test for GetResourceNetworkName.
Günther Deschner [Thu, 9 Jul 2015 15:25:24 +0000 (17:25 +0200)]
s4-torture: add test for GetResourceNetworkName.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agos3-clusapi: add test for GetResourceDependencyExpression.
Günther Deschner [Thu, 9 Jul 2015 15:23:32 +0000 (17:23 +0200)]
s3-clusapi: add test for GetResourceDependencyExpression.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agos4-torture: add more tests for clusapi_OpenResource().
Günther Deschner [Wed, 1 Jul 2015 14:58:06 +0000 (16:58 +0200)]
s4-torture: add more tests for clusapi_OpenResource().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: José A. Rivera <jarrpa@samba.org>
8 years agos3-net: use talloc array in share allowedusers
Ralph Boehme [Tue, 4 Aug 2015 09:18:34 +0000 (11:18 +0200)]
s3-net: use talloc array in share allowedusers

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Aug  4 16:48:36 CEST 2015 on sn-devel-104

8 years agodns_server: Fix CNAME handling
Volker Lendecke [Sat, 1 Aug 2015 15:59:14 +0000 (17:59 +0200)]
dns_server: Fix CNAME handling

recs[i].wtype is == DNS_TYPE_CNAME, and my understanding of the union is that
data.cname is filled. We get away with this, because ipv4 and ipv6 have the
same char * representation, but it's confusing.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Aug  4 13:41:17 CEST 2015 on sn-devel-104

8 years agodns_server: Add NULL check
Volker Lendecke [Sat, 1 Aug 2015 15:53:56 +0000 (17:53 +0200)]
dns_server: Add NULL check

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
8 years agolib/util/debug.h uses va_list, needs stdarg.h
Douglas Bagnall [Thu, 9 Jul 2015 06:16:56 +0000 (18:16 +1200)]
lib/util/debug.h uses va_list, needs stdarg.h

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug  1 13:59:13 CEST 2015 on sn-devel-104

8 years agonet: Print time of last password change in 'net ads info'
Christof Schmitt [Thu, 30 Jul 2015 22:52:08 +0000 (15:52 -0700)]
net: Print time of last password change in 'net ads info'

This is useful for debugging overwritten machine accounts, e.g. a
second machine is joined to a domain with the same name as the
first one.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agosecrets: Add function to fetch only password change timestamp
Christof Schmitt [Thu, 30 Jul 2015 22:47:54 +0000 (15:47 -0700)]
secrets: Add function to fetch only password change timestamp

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodoc: mention that `smbd -i` exits after first connection
Aurelien Aptel [Fri, 31 Jul 2015 15:01:10 +0000 (17:01 +0200)]
doc: mention that `smbd -i` exits after first connection

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: update the README with instructions for adding a parameter
Michael Adam [Thu, 23 Jul 2015 23:56:39 +0000 (01:56 +0200)]
param: update the README with instructions for adding a parameter

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 31 05:00:57 CEST 2015 on sn-devel-104

8 years agoparam: remove the static param_table.
Michael Adam [Thu, 23 Jul 2015 22:31:27 +0000 (00:31 +0200)]
param: remove the static param_table.

It is now auto-generated.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agotests:docs: don't load or test the static param_table.
Michael Adam [Thu, 23 Jul 2015 23:29:37 +0000 (01:29 +0200)]
tests:docs: don't load or test the static param_table.

It is going to be removed for the generated table.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agotests:docs: remove testing the diff between the static and generated table
Michael Adam [Thu, 23 Jul 2015 21:56:11 +0000 (23:56 +0200)]
tests:docs: remove testing the diff between the static and generated table

This reverts commit 380e0769ad3563dc762fb0c9ebe57d8131846519.

This is in preparation of the removal of the committed param_table_static.c

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: use the generated parameter table.
Michael Adam [Thu, 23 Jul 2015 16:40:27 +0000 (18:40 +0200)]
param: use the generated parameter table.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agotests:docs: test the diff between the static and generated table
Michael Adam [Thu, 23 Jul 2015 14:29:23 +0000 (16:29 +0200)]
tests:docs: test the diff between the static and generated table

This proves that the committed and the generated parameter tables
are identical (modulo order).

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agotests:docs: load the full data from the generated param_table
Michael Adam [Thu, 23 Jul 2015 21:15:38 +0000 (23:15 +0200)]
tests:docs: load the full data from the generated param_table

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agotests:docs: load the full data from the existing param_table.
Michael Adam [Thu, 23 Jul 2015 21:15:07 +0000 (23:15 +0200)]
tests:docs: load the full data from the existing param_table.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agotests:docs: add a function to load the full data structures from the table
Michael Adam [Thu, 23 Jul 2015 21:10:16 +0000 (23:10 +0200)]
tests:docs: add a function to load the full data structures from the table

instead of just loading the list of parameter names.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agotests:docs: print more complicated structures than strings in the message.
Michael Adam [Thu, 23 Jul 2015 14:25:45 +0000 (16:25 +0200)]
tests:docs: print more complicated structures than strings in the message.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agotests:docs: common initialization in docs test.
Michael Adam [Wed, 22 Jul 2015 13:16:16 +0000 (15:16 +0200)]
tests:docs: common initialization in docs test.

Just load the structures once at startup.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agobuild: generate param_table_gen.c from docs in the build
Michael Adam [Tue, 28 Apr 2015 09:45:43 +0000 (11:45 +0200)]
build: generate param_table_gen.c from docs in the build

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agogenerate_param: add a means to generate param_table_gen.c from the docs
Michael Adam [Thu, 18 Jun 2015 05:37:24 +0000 (07:37 +0200)]
generate_param: add a means to generate param_table_gen.c from the docs

This is triggered by the new argument PARAMTABLE.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: move the actual table out into param_table_static.c
Michael Adam [Thu, 23 Jul 2015 16:37:00 +0000 (18:37 +0200)]
param: move the actual table out into param_table_static.c

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodocs:smbdotconf: change type to ustring where needed.
Michael Adam [Thu, 23 Jul 2015 15:42:22 +0000 (17:42 +0200)]
docs:smbdotconf: change type to ustring where needed.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodocs:smbdotconf: change type to octal where needed
Michael Adam [Thu, 23 Jul 2015 15:41:28 +0000 (17:41 +0200)]
docs:smbdotconf: change type to octal where needed

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodocs:smbdotconf: change type to bytes where needed
Michael Adam [Thu, 23 Jul 2015 15:34:28 +0000 (17:34 +0200)]
docs:smbdotconf: change type to bytes where needed

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodocs:smbdotconf: change type to cmdlist where needed.
Michael Adam [Thu, 23 Jul 2015 15:19:19 +0000 (17:19 +0200)]
docs:smbdotconf: change type to cmdlist where needed.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agotests:docs: teach the test the types cmdlist, bytes, octal, and ustring
Michael Adam [Thu, 23 Jul 2015 23:28:56 +0000 (01:28 +0200)]
tests:docs: teach the test the types cmdlist, bytes, octal, and ustring

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agogenerate_param: teach missing types cmdlist, bytes, octal, ustring.
Michael Adam [Thu, 23 Jul 2015 16:01:40 +0000 (18:01 +0200)]
generate_param: teach missing types cmdlist, bytes, octal, ustring.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agogenerate_param: more uniform formatting of various type dicts
Michael Adam [Thu, 23 Jul 2015 16:00:41 +0000 (18:00 +0200)]
generate_param: more uniform formatting of various type dicts

This allows for easier extension later on (patch context-wise).

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodocs:smbdotconf: add deprecated flags where missing.
Michael Adam [Thu, 23 Jul 2015 14:24:34 +0000 (16:24 +0200)]
docs:smbdotconf: add deprecated flags where missing.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodocs:smbdotconf: make preload a synonym of 'auto services'
Michael Adam [Thu, 23 Jul 2015 12:39:27 +0000 (14:39 +0200)]
docs:smbdotconf: make preload a synonym of 'auto services'

It is this way around in internal data structures.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodocs:smbdotconf: 'write ok' is a synonym of 'writeable' not of 'read only'
Michael Adam [Thu, 23 Jul 2015 18:45:07 +0000 (20:45 +0200)]
docs:smbdotconf: 'write ok' is a synonym of 'writeable' not of 'read only'

(It is a reverse synonym of 'read only'...)

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: don't list '-valid' and 'copy' as synonyms - they aren't
Michael Adam [Thu, 23 Jul 2015 14:51:59 +0000 (16:51 +0200)]
param: don't list '-valid' and 'copy' as synonyms - they aren't

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: make 'timestamp logs' the default writing of 'debug timestamp'
Michael Adam [Thu, 23 Jul 2015 14:42:48 +0000 (16:42 +0200)]
param: make 'timestamp logs' the default writing of 'debug timestamp'

This is how it used internally.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: add SYNONYM flag where missing
Michael Adam [Thu, 23 Jul 2015 11:59:26 +0000 (13:59 +0200)]
param: add SYNONYM flag where missing

thereby remove DEPRECATED flags: synonyms currently
only carry the syn flag. Other flags sit on the primary
entry.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: move dnsdomain from generate_param to EXTRA_GLOBALS
Michael Adam [Wed, 22 Jul 2015 17:47:22 +0000 (19:47 +0200)]
param: move dnsdomain from generate_param to EXTRA_GLOBALS

This is alongside realm_original which is of the same kind.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agogenerate_param: generate struct entries if we don't generate access functions.
Michael Adam [Wed, 22 Jul 2015 17:14:26 +0000 (19:14 +0200)]
generate_param: generate struct entries if we don't generate access functions.

This shrinks LOADPARM_EXTRA_GLOBALS/LOCALS.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agogenerate_param: make it possible to handle generated and synonym flags in iteration
Michael Adam [Tue, 28 Apr 2015 14:47:39 +0000 (16:47 +0200)]
generate_param: make it possible to handle generated and synonym flags in iteration

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodocs:smbdotconf: add 'function' argument to writeable
Michael Adam [Wed, 22 Jul 2015 17:29:56 +0000 (19:29 +0200)]
docs:smbdotconf: add 'function' argument to writeable

This is to specify the storage place for this reverse boolean.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodocs:smbdotconf: add 'function' parameter to enablespoolss
Michael Adam [Wed, 22 Jul 2015 17:29:16 +0000 (19:29 +0200)]
docs:smbdotconf: add 'function' parameter to enablespoolss

this is to specify the storage place for this reverse boolean.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodocs:smbdotconf: add 'function' parameter to valid
Michael Adam [Wed, 22 Jul 2015 17:26:46 +0000 (19:26 +0200)]
docs:smbdotconf: add 'function' parameter to valid

This is to differentiate the variable/function name from
the parameter name, which is the non-standard "-valid".

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: rename szIdmapGID -> idmap_gid
Michael Adam [Wed, 22 Jul 2015 17:13:55 +0000 (19:13 +0200)]
param: rename szIdmapGID -> idmap_gid

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: rename szIdmapUID -> idmap_uid
Michael Adam [Wed, 22 Jul 2015 17:12:53 +0000 (19:12 +0200)]
param: rename szIdmapUID -> idmap_uid

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: rename szIdmapBackend -> idmap_backend
Michael Adam [Wed, 22 Jul 2015 17:11:12 +0000 (19:11 +0200)]
param: rename szIdmapBackend -> idmap_backend

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: rename szInclude -> include
Michael Adam [Wed, 22 Jul 2015 17:09:35 +0000 (19:09 +0200)]
param: rename szInclude -> include

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: rename szCopy -> copy
Michael Adam [Wed, 22 Jul 2015 17:08:15 +0000 (19:08 +0200)]
param: rename szCopy -> copy

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: rename bAvailable -> available
Michael Adam [Wed, 22 Jul 2015 17:06:39 +0000 (19:06 +0200)]
param: rename bAvailable -> available

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: make 'realm' use the standard 'realm' variable.
Michael Adam [Tue, 12 May 2015 11:41:44 +0000 (13:41 +0200)]
param: make 'realm' use the standard 'realm' variable.

This way, the generated lp_realm() function matches the param_table.
realm_original is only treated in the special handler now.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: turn 'cups encrypt' into a generated function
Michael Adam [Wed, 22 Jul 2015 14:22:40 +0000 (16:22 +0200)]
param: turn 'cups encrypt' into a generated function

Move the special stuff of the hand-written lp_cups_encrypt()
function into a handler that is called once at load time.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: rename CupsEncrypt -> cups_encrypt
Michael Adam [Wed, 22 Jul 2015 14:21:35 +0000 (16:21 +0200)]
param: rename CupsEncrypt -> cups_encrypt

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: make 'winbind max domain connections' a generated function.
Michael Adam [Tue, 21 Jul 2015 21:49:45 +0000 (23:49 +0200)]
param: make 'winbind max domain connections' a generated function.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>